Bill Allombert on Fri, 17 Jul 2009 20:27:55 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: times


On Wed, Jul 15, 2009 at 12:32:20AM +0100, Jason Moxham wrote:
> Here are some timings for PARI svn on Intel i7 2.6Ghz on cygwin32/Vista32 
> with MPIR-1.2.1
>
> * Testing analyz        for gp-sta..TIME=31     for gp-dyn..TIME=15
> * Testing apply         for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing aurifeuille   for gp-sta..BUG [15]    for gp-dyn..TIME=0
> * Testing bnfisintnorm  for gp-sta..TIME=499    for gp-dyn..TIME=483
> * Testing bnr   for gp-sta..TIME=15     for gp-dyn..TIME=0
> * Testing charpoly      for gp-sta..TIME=0      for gp-dyn..TIME=15
> * Testing combinat      for gp-sta..TIME=15     for gp-dyn..TIME=0
> * Testing compat        for gp-sta..TIME=202    for gp-dyn..TIME=156
> * Testing contfrac      for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing ell   for gp-sta..TIME=7924   for gp-dyn..TIME=7956
> * Testing ellglobalred  for gp-sta..BUG [0]     for gp-dyn..BUG [0]
> * Testing elliptic      for gp-sta..TIME=15     for gp-dyn..TIME=16
> * Testing ellsea        for gp-sta..BUG [0]     for gp-dyn..BUG [0]
> * Testing ellweilpairing        for gp-sta..TIME=62     for gp-dyn..TIME=46
> * Testing err   for gp-sta..TIME=15     for gp-dyn..TIME=0
> * Testing exact0        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing extract       for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing ff    for gp-sta..TIME=468    for gp-dyn..TIME=468
> * Testing ffisom        for gp-sta..TIME=327    for gp-dyn..TIME=327
> * Testing galois        for gp-sta..BUG [561]   for gp-dyn..BUG [562]
> * Testing galoisinit    for gp-sta..TIME=4570   for gp-dyn..TIME=4492
> * Testing graph         for gp-sta..TIME=15     for gp-dyn..TIME=0
> * Testing ideal         for gp-sta..BUG [0]     for gp-dyn..BUG [15]
> * Testing idealappr     for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing intformal     for gp-sta..TIME=0      for gp-dyn..TIME=15
> * Testing intnum        for gp-sta..TIME=17924  for gp-dyn..TIME=17924
> * Testing ispower       for gp-sta..TIME=3260   for gp-dyn..TIME=3307
> * Testing linear        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing list  for gp-sta..TIME=46     for gp-dyn..TIME=46
> * Testing lll   for gp-sta..TIME=0      for gp-dyn..TIME=15
> * Testing mat   for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing member        for gp-sta..TIME=78     for gp-dyn..TIME=46
> * Testing modpr         for gp-sta..TIME=0      for gp-dyn..TIME=15
> * Testing multivar-mul  for gp-sta..TIME=5709   for gp-dyn..TIME=5678
> * Testing nf    for gp-sta..TIME=1903   for gp-dyn..TIME=1903
> * Testing nffactor      for gp-sta..TIME=10857  for gp-dyn..TIME=10951
> * Testing nfhilbert     for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing nfields       for gp-sta..TIME=109    for gp-dyn..TIME=109
> * Testing nfrootsof1    for gp-sta..TIME=25864  for gp-dyn..TIME=25942
> * Testing number        for gp-sta..TIME=31     for gp-dyn..TIME=15
> * Testing objets        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing partition     for gp-sta..TIME=23431  for gp-dyn..TIME=23571
> * Testing polchebyshev  for gp-sta..TIME=15     for gp-dyn..TIME=0
> * Testing polmod        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing polred        for gp-sta..TIME=3478   for gp-dyn..TIME=3400
> * Testing polyser       for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing printf        for gp-sta..TIME=0      for gp-dyn..TIME=15
> * Testing program       for gp-sta..BUG [15]    for gp-dyn..TIME=15
> * Testing qf    for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing qfbsolve      for gp-sta..TIME=1809   for gp-dyn..TIME=1825
> * Testing quad  for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing quadclassunit         for gp-sta..TIME=8268   for  
> gp-dyn..TIME=8299
> * Testing quadray       for gp-sta..TIME=889    for gp-dyn..TIME=826
> * Testing random        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing resultant     for gp-sta..TIME=5584   for gp-dyn..TIME=5632
> * Testing rfrac         for gp-sta..TIME=2761   for gp-dyn..TIME=2714
> * Testing rnf   for gp-sta..TIME=343    for gp-dyn..TIME=358
> * Testing rnfkummer     for gp-sta..TIME=43415  for gp-dyn..TIME=43337
> * Testing round4        for gp-sta..TIME=7363   for gp-dyn..TIME=7347
> * Testing select        for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing stark         for gp-sta..TIME=25350  for gp-dyn..TIME=25272
> * Testing subcyclo      for gp-sta..TIME=0      for gp-dyn..TIME=0
> * Testing subfields     for gp-sta..TIME=13634  for gp-dyn..TIME=13681
> * Testing sumiter       for gp-sta..TIME=16     for gp-dyn..TIME=15
> * Testing thue  for gp-sta..TIME=1606   for gp-dyn..TIME=1606
> * Testing trans         for gp-sta..TIME=31     for gp-dyn..TIME=46
> * Testing zetak         for gp-sta..TIME=5725   for gp-dyn..TIME=5662
> * Testing zn    for gp-sta..TIME=15     for gp-dyn..TIME=15
>
> Here is the same but built with MSVC v9
>
> analyz Windows time took:46
> apply Windows time took:0
> ERROR aurifeuille
> aurifeuille Windows time took:0
> bnfisintnorm Windows time took:530
> bnr Windows time took:15
> charpoly Windows time took:0
> combinat Windows time took:15
> compat Windows time took:218
> contfrac Windows time took:15
> ell Windows time took:12074
> ERROR ellglobalred
> ellglobalred Windows time took:15
> elliptic Windows time took:15
> ERROR ellsea
> ellsea Windows time took:0
> ellweilpairing Windows time took:46
> err Windows time took:0
> exact0 Windows time took:15
> extract Windows time took:0
> ff Windows time took:795
> ffisom Windows time took:639
> ERROR galois
> galois Windows time took:577
> galoisinit Windows time took:4976
> graph Windows time took:15
> ideal Windows time took:0
> idealappr Windows time took:0
> intformal Windows time took:15
> intnum Windows time took:19765
> ispower Windows time took:4446
> linear Windows time took:15
> list Windows time took:46
> lll Windows time took:15
> mat Windows time took:0
> member Windows time took:62
> modpr Windows time took:15
> multivar-mul Windows time took:6630
> nf Windows time took:1934
> nffactor Windows time took:11762
> nfhilbert Windows time took:15
> nfields Windows time took:109
> nfrootsof1 Windows time took:27799
> number Windows time took:31
> objets Windows time took:15
> partition Windows time took:28610
> ERROR ploth
> ploth Windows time took:15
> polchebyshev Windows time took:15
> polmod Windows time took:15
> ERROR polred
> polred Windows time took:1201
> polyser Windows time took:15
> printf Windows time took:0
> ERROR program
> program Windows time took:15
> qf Windows time took:0
> qfbsolve Windows time took:1918
> quad Windows time took:0
> quadclassunit Windows time took:9469
> quadray Windows time took:982
> random Windows time took:15
> resultant Windows time took:5709
> rfrac Windows time took:2995
> ERROR rnf
> rnf Windows time took:421
> ERROR rnfkummer
> rnfkummer Windows time took:44694
> round4 Windows time took:9578
> select Windows time took:15
> stark Windows time took:28033
> subcyclo Windows time took:15
> subfields Windows time took:17706
> sumiter Windows time took:15
> thue Windows time took:1684
> trans Windows time took:62
> zetak Windows time took:6318
> zn Windows time took:15
>
> The obvious defiency with the MSVC build is the lack of inline assembler 
> , MSVC does not support inline assembler , although it has a few compiler 
> intrinsics we can use eg mul and bitscan , but no div/add . I dont know 
> how much difference this makes to Pari , I know with MPIR/GMP it make 
> very little difference as long as you are using assembler for the mpn_* 
> stuff

The only important assembly bit is mulll because x86 processors can
do 32x32bit->64bit multiplies.

If you can write mulll using intrisics, you should get some performance
improvement, even with the GMP kernel, because one-word operations are
very frequent in PARI.

Cheers,
Bill.