Skip to content

Iterator of ndarray has poor performance than Iterator of slice  #500

Description

@tuxzz

I've made a simple performance test

i7-4790 3.60GHz + Windows 10 17763 + rustc 1.31.0-nightly (2bd5993ca 2018-10-02) x86_64-pc-windows-msvc

Test Time(s)
ndarray_iter 2.684
slice_iter 0.875
slice_loop_safe_good 0.298

i7-4790 3.60GHz + Windows 10 17763 + rustc 1.31.0-nightly (2bd5993ca 2018-10-02) x86_64-pc-windows-msvc + Thin LTO

Test Time(s)
ndarray_iter 1.310
slice_iter 0.776
slice_loop_safe_good 0.288
ndarray_loop_safe_good 0.133
slice_loop_unsafe_good 0.132

Iterate over a ArrayView is incredible slow than slice.
But for loop on ArrayView as fast as to get_unchecked on slice.
Maybe a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions