Skip to content

Comment on Nemo: computer algebra package for Juliaparent

Comments

Not necessarily the most representative benchmark, but:

    >>> from sympy import *
    >>> from time import clock
    >>> var('x y z t')
    (x, y, z, t)
    >>> f = poly(1 + x + y + z + t)
    >>> p = f ** 20
    >>> t1=clock(); q=p*(p+1); clock()-t1
    53.828634

    julia> using Nemo
    julia> Rx,x=PolynomialRing(ZZ,"x");
    julia> Ry,y=PolynomialRing(Rx,"y");
    julia> Rz,z=PolynomialRing(Ry,"z");
    julia> Rt,t=PolynomialRing(Rz,"t");
    julia> p = (1+x+y+z+t)^20;
    julia> @time p*(p+1);
    1.593379 seconds (129.24 k allocations: 6.758 MB, 0.82% gc time)
Edit: oops, I forgot a variable which made the benchmark totally unfair!
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.