GithubHelp home page GithubHelp logo

Comments (2)

cartazio avatar cartazio commented on June 12, 2024

I think the issue you're seeing on the small vectors is that Storable Vectors have better alignment guarantees than unboxed vectors (because storable uses immovable vectors)

https://gist.github.com/cartazio/2eb344be116c3d83cecb

./main
benchmarking dot prod (3)/List
time                 296.5 ns   (293.8 ns .. 299.7 ns)
                     0.999 R²   (0.998 R² .. 1.000 R²)
mean                 298.0 ns   (294.9 ns .. 302.6 ns)
std dev              12.54 ns   (9.453 ns .. 17.11 ns)
variance introduced by outliers: 61% (severely inflated)

benchmarking dot prod (3)/Vector
time                 20.51 ns   (20.18 ns .. 20.92 ns)
                     0.993 R²   (0.984 R² .. 0.998 R²)
mean                 21.53 ns   (20.78 ns .. 22.85 ns)
std dev              3.503 ns   (2.124 ns .. 5.587 ns)
variance introduced by outliers: 97% (severely inflated)

benchmarking dot prod (3)/Unboxed
time                 15.53 ns   (15.24 ns .. 15.88 ns)
                     0.996 R²   (0.993 R² .. 0.998 R²)
mean                 16.13 ns   (15.69 ns .. 16.96 ns)
std dev              2.028 ns   (1.304 ns .. 3.064 ns)
variance introduced by outliers: 95% (severely inflated)

benchmarking dot prod (3)/Storable
time                 12.75 ns   (12.59 ns .. 12.96 ns)
                     0.998 R²   (0.997 R² .. 0.999 R²)
mean                 12.86 ns   (12.69 ns .. 13.27 ns)
std dev              819.3 ps   (440.3 ps .. 1.552 ns)
variance introduced by outliers: 82% (severely inflated)

benchmarking dot prod (3000)/List
time                 212.6 μs   (211.0 μs .. 214.7 μs)
                     0.998 R²   (0.997 R² .. 0.999 R²)
mean                 218.8 μs   (215.1 μs .. 224.8 μs)
std dev              15.36 μs   (11.01 μs .. 21.84 μs)
variance introduced by outliers: 65% (severely inflated)

benchmarking dot prod (3000)/Vector
time                 7.241 μs   (7.076 μs .. 7.409 μs)
                     0.995 R²   (0.991 R² .. 0.998 R²)
mean                 7.303 μs   (7.163 μs .. 7.474 μs)
std dev              540.9 ns   (423.0 ns .. 713.1 ns)
variance introduced by outliers: 78% (severely inflated)

benchmarking dot prod (3000)/Unboxed
time                 2.886 μs   (2.846 μs .. 2.928 μs)
                     0.998 R²   (0.997 R² .. 0.999 R²)
mean                 2.876 μs   (2.842 μs .. 2.932 μs)
std dev              143.1 ns   (89.39 ns .. 224.8 ns)
variance introduced by outliers: 64% (severely inflated)

benchmarking dot prod (3000)/Storable
time                 2.891 μs   (2.857 μs .. 2.934 μs)
                     0.998 R²   (0.997 R² .. 0.999 R²)
mean                 2.927 μs   (2.885 μs .. 2.988 μs)
std dev              160.7 ns   (131.5 ns .. 200.4 ns)
variance introduced by outliers: 68% (severely inflated)

from vector.

cartazio avatar cartazio commented on June 12, 2024

i guess what i'm saying is storable and unboxed have different memory layouts, so they will behave different under different workloads

from vector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.