xtensor-stack / xtensor-benchmark

Easy to use benchmarks for linear algebra frameworks
BSD 3-Clause "New" or "Revised" License
24 stars 8 forks source link

Fix conda environment and cmake build #2

Closed benbovy closed 6 years ago

benbovy commented 6 years ago

I just wanted to run the benchmarks on my machine (MacOS) but I had to fix the following:

wolfv commented 6 years ago

Hi Benoit, this is great! Thanks for the changes.

How did the benchmark go on your machine?

SylvainCorlay commented 6 years ago

Thanks @benbovy for this work!

benbovy commented 6 years ago

How did the benchmark go on your machine?

Not bad I would say, although I'm not much experienced yet to have good interpretation of these benchmarks (I was just curious :-) )

Here are the results (Macbook Pro 15'' Mid 2015, 2.5 GHz i7):

CMake output

``` -- The C compiler identification is AppleClang 9.0.0.9000038 -- The CXX compiler identification is AppleClang 9.0.0.9000038 -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Found Blitz: /Users/benbovy/miniconda3/envs/xtensor-benchmark/include -- Found Armadillo: /Users/benbovy/miniconda3/envs/xtensor-benchmark/lib/libarmadillo.dylib (found version "8.200.0") -- Found PythonLibs: /Users/benbovy/miniconda3/envs/xtensor-benchmark/lib/libpython3.6m.dylib (found version "3.6.4") -- Found PythonInterp: /Users/benbovy/miniconda3/envs/xtensor-benchmark/bin/python3.6 (found version "3.6.4") -- Found NumPy: version "1.14.0" /Users/benbovy/miniconda3/envs/xtensor-benchmark/lib/python3.6/site-packages/numpy/core/include -- Found Pythran (Pythonic): version "0.8.3" /Users/benbovy/miniconda3/envs/xtensor-benchmark/lib/python3.6/site-packages/pythran ```

Benchmark results

``` USING XSIMD SIMD SIZE: 4 void print_type(T &&) [T = xt::xarray_container >, xt::layout_type::row_major, std::__1::vector >, xt::xtensor_expression_tag>] void print_type(T &&) [T = xt::xtensor_container >, 2, xt::layout_type::row_major, xt::xtensor_expression_tag>] Run on (8 X 2500 MHz CPU s) 2018-01-23 18:09:40 --------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------- eigen_test_1D/3 72 ns 71 ns 8383635 eigen_test_1D/8 76 ns 76 ns 8711994 eigen_test_1D/64 125 ns 125 ns 5971830 eigen_test_1D/512 131 ns 131 ns 5360863 eigen_test_1D/1000 190 ns 190 ns 3613743 xtensor_test_1D/3 94 ns 94 ns 7259378 xtensor_test_1D/8 99 ns 99 ns 7021979 xtensor_test_1D/64 167 ns 167 ns 4116630 xtensor_test_1D/512 277 ns 277 ns 2483423 xtensor_test_1D/1000 474 ns 470 ns 1378686 pythonic_test_1D/3 198 ns 198 ns 3371999 pythonic_test_1D/8 192 ns 192 ns 3124149 pythonic_test_1D/64 225 ns 225 ns 3076125 pythonic_test_1D/512 300 ns 300 ns 2342210 pythonic_test_1D/1000 425 ns 424 ns 1499347 xtensor_view/128 438 ns 438 ns 1551938 xtensor_dynamicview/128 377 ns 377 ns 1879079 eigen_view/128 127 ns 127 ns 5367110 eigen_map/128 131 ns 131 ns 4862529 xtensor_stride_2/128 352 ns 352 ns 2022800 xtensor_max_speed/128 168 ns 168 ns 4136382 xtensor_adapt_view/128 173 ns 173 ns 3489740 xtensor_hand_loop/128 141 ns 140 ns 4609873 xsimd_test/3 74 ns 74 ns 9739944 xsimd_test/8 118 ns 118 ns 5907023 xsimd_test/64 1706 ns 1705 ns 393880 xsimd_test/512 197143 ns 196973 ns 3357 xsimd_test/1000 1149069 ns 1148442 ns 561 eigen_test/3 86 ns 86 ns 8461669 eigen_test/8 143 ns 143 ns 4811460 eigen_test/64 1640 ns 1639 ns 402079 eigen_test/512 200567 ns 200528 ns 3323 eigen_test/1000 1181716 ns 1181095 ns 589 xtensor_test/3 109 ns 109 ns 6279942 xtensor_test/8 172 ns 172 ns 4159684 xtensor_test/64 1936 ns 1936 ns 360457 xtensor_test/512 206881 ns 206734 ns 3399 xtensor_test/1000 1169128 ns 1168682 ns 597 blitz_test/3 311 ns 311 ns 2261727 blitz_test/8 346 ns 345 ns 1992366 blitz_test/64 1927 ns 1926 ns 367794 blitz_test/512 203002 ns 202849 ns 3303 blitz_test/1000 1163916 ns 1163213 ns 563 arma_test/3 11 ns 11 ns 59680115 arma_test/8 134 ns 133 ns 5554762 arma_test/64 1688 ns 1687 ns 418946 arma_test/512 195899 ns 195801 ns 3484 arma_test/1000 1175745 ns 1175032 ns 593 pythonic_test/3 250 ns 250 ns 2856385 pythonic_test/8 239 ns 239 ns 2941584 pythonic_test/64 250 ns 250 ns 3086052 pythonic_test/512 235 ns 235 ns 2926299 pythonic_test/1000 249 ns 249 ns 2944727 eigen_alloc/4 66 ns 65 ns 10679197 eigen_alloc/8 66 ns 66 ns 10659357 eigen_alloc/64 101 ns 101 ns 6627846 eigen_alloc/512 66 ns 66 ns 10194719 eigen_alloc/1000 65 ns 64 ns 10654490 super_alloc<16>/4 68 ns 68 ns 9623051 super_alloc<16>/8 68 ns 68 ns 10276436 super_alloc<16>/64 103 ns 103 ns 6648810 super_alloc<16>/512 66 ns 66 ns 10092272 super_alloc<16>/1000 66 ns 65 ns 9827734 super_alloc<32>/4 69 ns 69 ns 10423957 super_alloc<32>/8 68 ns 68 ns 9454988 super_alloc<32>/64 102 ns 102 ns 6736340 super_alloc<32>/512 67 ns 67 ns 10190118 super_alloc<32>/1000 65 ns 64 ns 10647683 mm_alloc<16>/4 68 ns 68 ns 9958317 mm_alloc<16>/8 68 ns 68 ns 10448697 mm_alloc<16>/64 102 ns 102 ns 6391352 mm_alloc<16>/512 64 ns 64 ns 10572581 mm_alloc<16>/1000 66 ns 65 ns 10553453 mm_alloc<32>/4 191 ns 191 ns 3591235 mm_alloc<32>/8 189 ns 189 ns 3529685 mm_alloc<32>/64 238 ns 237 ns 2898215 mm_alloc<32>/512 68 ns 67 ns 10527899 mm_alloc<32>/1000 66 ns 65 ns 9900990 ```