gmpbench -- how to utilize all CPU cores?

Mike Mohr akihana at gmail.com
Thu Sep 26 23:47:25 CEST 2013


What would be the point?  Your benchmark would be an apples-to-oranges
comparison since you would need to take threading overhead into account and
other, older benchmarks would still represent single-threaded performance.
I haven't looked at the benchmark code recently, but I can't imagine that
it would be too hard to write some pthreads wrappers if you really wanted
to.


On Thu, Sep 26, 2013 at 12:18 PM, . <dcMhOYBdpZkH at web.de> wrote:

> http://gmplib.org/gmpbench.html
>
> Good open source benchmark, but if I run it, it uses only one CPU core.
> Is it possible to use all CPU cores?
>
> My results for fun and info ("model name    : Intel(R) Core(TM)2 Duo
> CPU     T5450  @ 1.66GHz")
>
>     gmpbench-0.2$ ./runbench
>     ***** GMPbench version 0.2 *****
>     Using default CFLAGS = "-O3 -fomit-frame-pointer"
>     Using default CC = "gcc"
>     Using default LIBS = "-static -lgmp"
>     Using compilation command: gcc -O3 -fomit-frame-pointer foo.c -o foo
>     -static -lgmp
>     You may want to override CC, CFLAGS, and LIBS
>     Using gmp version: 5.1.2
>     Compiling benchmarks
>     Running benchmarks (propagated score accuracy exceeds printed
>     intermediates)
>       Category base
>         Program multiply (weight=1)
>           GMPbench.base.multiply(128)                        1.448e+07
>           GMPbench.base.multiply(512)                          2.4e+06
>           GMPbench.base.multiply(8192)                        2.37e+04
>           GMPbench.base.multiply(131072)                           505
>           GMPbench.base.multiply(2097152)                         18.5
>           GMPbench.base.multiply(128,128)                    1.036e+07
>           GMPbench.base.multiply(512,512)                    1.592e+06
>           GMPbench.base.multiply(8192,8192)                  1.694e+04
>           GMPbench.base.multiply(131072,131072)                    358
>           GMPbench.base.multiply(2097152,2097152)                 12.6
>           GMPbench.base.multiply(15000,10000)                     8551
>           GMPbench.base.multiply(20000,10000)                     6989
>           GMPbench.base.multiply(30000,10000)                     4383
>           GMPbench.base.multiply(16777216,512)                    44.7
>           GMPbench.base.multiply(16777216,262144)                 3.01
>         GMPbench.base.multiply                        5873.6
>         Program divide (weight=1)
>           GMPbench.base.divide(8192,32)                      3.055e+05
>           GMPbench.base.divide(8192,64)                      2.332e+05
>           GMPbench.base.divide(8192,128)                      1.09e+05
>           GMPbench.base.divide(8192,4096)                    3.065e+04
>           GMPbench.base.divide(131072,65536)                       448
>           GMPbench.base.divide(8388608,4194304)                   2.59
>           GMPbench.base.divide(8192,8064)                    3.026e+06
>           GMPbench.base.divide(16777216,262144)                   1.56
>         GMPbench.base.divide                          5812.8
>         Program gcd (weight=0.5)
>           GMPbench.base.gcd(128,128)                         6.351e+05
>           GMPbench.base.gcd(512,512)                         9.725e+04
>           GMPbench.base.gcd(8192,8192)                            1661
>           GMPbench.base.gcd(131072,131072)                        23.7
>           GMPbench.base.gcd(1048576,1048576)                      1.31
>         GMPbench.base.gcd                             1260.7
>         Program gcdext (weight=0.5)
>           GMPbench.base.gcdext(128,128)                      4.373e+05
>           GMPbench.base.gcdext(512,512)                      7.215e+04
>           GMPbench.base.gcdext(8192,8192)                         1073
>           GMPbench.base.gcdext(131072,131072)                     16.4
>           GMPbench.base.gcdext(1048576,1048576)                  0.816
>         GMPbench.base.gcdext                          853.54
>       GMPbench.base                           3284
>       Category app
>         Program rsa (weight=1)
>           GMPbench.app.rsa(512)                                   3824
>           GMPbench.app.rsa(1024)                                   675
>           GMPbench.app.rsa(2048)                                  98.5
>         GMPbench.app.rsa                              633.51
>         Program pi (weight=1)
>           GMPbench.app.pi(10000)                                   163
>           GMPbench.app.pi(100000)                                 7.26
>           GMPbench.app.pi(1000000)                               0.379
>         GMPbench.app.pi                               7.6546
>       GMPbench.app                          69.636
>     GMPbench:         478.21
>
> --
> OpenPGP key:
> https://keyserver2.pgp.com/vkd/DownloadKey.event?keyid=0xCDDFDD67A48E0139
>
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
>


More information about the gmp-discuss mailing list