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

Array pattern performance issues #32

Closed
thautwarm opened this issue Jan 31, 2019 · 1 comment
Closed

Array pattern performance issues #32

thautwarm opened this issue Jan 31, 2019 · 1 comment
Assignees
Labels
core infrastructures and some standard impl enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@thautwarm
Copy link
Owner

function check_generic_array(body)

Current one makes a trade-off for the performance of expr template patterns and normal array patterns.

Following one could be faster when it comes to normal array destructing.

 function check_generic_array(body)
            @format [Array, SubArray, UnitRange, Tuple, Int] quote

                @inline __L__ function NAME(TARGET :: Array{T, 1}) where {T}
                    body
                end

              @inline __L__ function NAME(TARGET :: SubArray{T, 1, Array{T, 1}, Tuple{UnitRange{Int}}, true}) where {T}
                    body
                end

                @inline __L__ function NAME(_)
                    failed
                end

                NAME(tag)

            end
end
@thautwarm thautwarm added enhancement New feature or request help wanted Extra attention is needed core infrastructures and some standard impl labels Jan 31, 2019
@thautwarm thautwarm added this to the 0.3.0 milestone Jan 31, 2019
@thautwarm thautwarm modified the milestones: 0.3.0, 0.4.0 May 1, 2019
@thautwarm
Copy link
Owner Author

solved in v0.4.0alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core infrastructures and some standard impl enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants