JuliaPerf / BenchmarksGame.jl

Other
43 stars 13 forks source link

Nbody: inline everything, make masses type parameters, use tuple recursion #26

Closed tkoolen closed 5 years ago

tkoolen commented 5 years ago

2.86 s -> 2.37 s.

With these changes, it's no longer beneficial to make Vec backed by a 4-tuple.

Not sure if this is allowed. Happy to make it a separate file instead of changing nbody-fast.jl if that's preferred.

KristofferC commented 5 years ago

This really feels like cheating the benchmark too much and adapting to the specific input data. I think we can still get better performance without "exploiting" using e.g. a SoA approach and vectorizing horizontally instead of vertically as we do now.