JuliaArrays / ArrayViews.jl

A Julia package to explore a new system of array views
MIT License
19 stars 18 forks source link

Faster Contigous Views of 4D Arrays #43

Closed JaredCrean2 closed 8 years ago

JaredCrean2 commented 8 years ago

This adds some roffset methods for 4D arrays. This makes constructing an contiguous unsafe_view of a 4D array roughly 2.5x faster.

Using the benchmark here:

before:

  0.892318 seconds (35.97 M allocations: 548.845 MB, 2.38% gc time)

after:

  0.332585 seconds
coveralls commented 8 years ago

Coverage Status

Coverage decreased (-2.0%) to 69.251% when pulling 204cc23138cacbd5fc19e861c8038937541952b6 on JaredCrean2:4dspeed into 4ec55697fc4f9cba522a5137b96d502230269910 on JuliaLang:master.

timholy commented 8 years ago

Following the coveralls link, it looks like at least one of your new functions isn't checked by the test, and moreover the generic splatting fallback isn't tested anymore.

JaredCrean2 commented 8 years ago

Interesting, I'll add a few more tests

coveralls commented 8 years ago

Coverage Status

Coverage increased (+6.8%) to 78.036% when pulling 130c79b91b74c608a2653f512f476bfd88a38e15 on JaredCrean2:4dspeed into 4ec55697fc4f9cba522a5137b96d502230269910 on JuliaLang:master.

timholy commented 8 years ago

Nice!