Skip to content

Conversation

@Luapulu
Copy link

@Luapulu Luapulu commented Apr 23, 2022

This implementation is about twice as fast as the current implementation for an AbstractVector of coefficients. See my benchmarks and a comparison with other implementations here.

The implementation works with custom array indices. Because I use @inbounds, the AbstractVector subtype must, for safety reasons, guarantee that all integer indices greater than or equal to firstindex and smaller than or equal to lastindex are valid.

@Luapulu
Copy link
Author

Luapulu commented Apr 24, 2022

Seems the errors have nothing to do with my changes here, but I'm not sure I'm qualified to rule it out.

@stevengj stevengj added performance Must go faster maths Mathematical functions labels Apr 25, 2022
- replace _evalpoly with new version
- remove blank lines
- deal with case where coefficient vector has length zero
- use nicer way to make variable v type stable
- add tests for zero length coefficients and evalpoly output type
@Luapulu
Copy link
Author

Luapulu commented Apr 26, 2022

I agree with your comments and made some changes accordingly.

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

Labels

maths Mathematical functions performance Must go faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants