hicder / muopdb

MuopDB - A Vector Database
https://github.com/hicder/muopdb/wiki
42 stars 3 forks source link

Benchmark L2 distance #45

Closed tyb0807 closed 1 month ago

tyb0807 commented 1 month ago

For completeness

L2 Distance/Scalar/16   time:   [3.0676 ns 3.0785 ns 3.0906 ns]
L2 Distance/SIMD/16     time:   [4.5063 ns 4.5171 ns 4.5291 ns]
L2 Distance/Scalar/32   time:   [7.1169 ns 7.1357 ns 7.1607 ns]
L2 Distance/SIMD/32     time:   [6.0645 ns 6.0703 ns 6.0762 ns]
L2 Distance/Scalar/64   time:   [17.253 ns 17.268 ns 17.287 ns]
L2 Distance/SIMD/64     time:   [9.6623 ns 9.6706 ns 9.6802 ns]
L2 Distance/Scalar/128  time:   [46.546 ns 46.596 ns 46.662 ns]
L2 Distance/SIMD/128    time:   [17.162 ns 17.172 ns 17.187 ns]
L2 Distance/Scalar/256  time:   [104.90 ns 105.01 ns 105.15 ns]
L2 Distance/SIMD/256    time:   [33.034 ns 33.049 ns 33.064 ns]
L2 Distance/Scalar/512  time:   [267.97 ns 268.22 ns 268.53 ns]
L2 Distance/SIMD/512    time:   [58.694 ns 58.737 ns 58.791 ns]
L2 Distance/Scalar/1024 time:   [618.16 ns 619.51 ns 621.37 ns]
L2 Distance/SIMD/1024   time:   [110.58 ns 110.87 ns 111.44 ns]
L2 Distance/Scalar/2048 time:   [1.3176 µs 1.3189 µs 1.3204 µs]
L2 Distance/SIMD/2048   time:   [212.38 ns 212.72 ns 213.26 ns]
L2 Distance/Scalar/4096 time:   [2.7153 µs 2.7175 µs 2.7200 µs]
L2 Distance/SIMD/4096   time:   [416.46 ns 417.31 ns 418.57 ns]
L2 Distance/Scalar/384  time:   [182.31 ns 197.45 ns 229.59 ns]
L2 Distance/SIMD/384    time:   [46.385 ns 46.500 ns 46.635 ns]
L2 Distance/Scalar/768  time:   [446.12 ns 447.15 ns 448.39 ns]
L2 Distance/SIMD/768    time:   [84.599 ns 84.754 ns 84.947 ns]
L2 Distance/Scalar/1536 time:   [972.20 ns 974.02 ns 976.03 ns]
L2 Distance/SIMD/1536   time:   [161.91 ns 162.37 ns 162.97 ns]
L2 Distance/Scalar/3072 time:   [2.0277 µs 2.0340 µs 2.0415 µs]
L2 Distance/SIMD/3072   time:   [315.49 ns 315.93 ns 316.41 ns]