Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom iterators for replace(), skip() and fail() #50

Merged
merged 3 commits into from
Oct 19, 2017
Merged

Commits on Oct 15, 2017

  1. Use custom iterators for replace(), skip() and fail()

    This dramatically improves the performance of skip() on arrays by getting
    rid of the type instability which is currently not well handled.
    This optimization cannot be applied to non-array iterables since it relies
    on passing indices and accessing an entry several times in some cases.
    Hovewer, forcing inlining makes the code somewhat faster even for non-arrays.
    Performance improvements are smaller but still significant for replace()
    and skip(). There is 2× regression when passing a generator to fail(), though,
    but the gain for the array case is worth it.
    
    The second advantage of using custom iterators is that eltype() returns
    Nulls.T(eltype(x)) when x is an array, while when using plain generators
    it returned Any.
    nalimilan committed Oct 15, 2017
    Configuration menu
    Copy the full SHA
    2060fe5 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2017

  1. Configuration menu
    Copy the full SHA
    65297f9 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2017

  1. Configuration menu
    Copy the full SHA
    1633af1 View commit details
    Browse the repository at this point in the history