Is it possible to improve the performance of line()?
See original GitHub issueI started with examples/timeseries.ipynb, modifying to have only one column:
In a bit of an ugly process, I then time canvas.line()
and canvas.points()
for increasing repeats of the dataframe:
line seems to be a lot slower than points:
(Sorry for the screenshots, but github doesn’t seem to allow notebooks to be attached.)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
5 Ways to Boost Your Line's Performance -- Right Now
5 Ways to Boost Your Line's Performance -- Right Now · 1. Reward trainers.First, model the behaviour you want. · 2. Reward small...
Read more >Increase Performance With Fewer Lines of Code
Data science is intimately associated with performance, whether it is ... That is a massive improvement with just a short line of code....
Read more >If we reduce the lines of code, will it run faster? - Quora
TL;DR both alternatives may be true. Many times, less readable and longer code hides speed issues, by shortening and cleaning it up one...
Read more >Improving C++'s reading file line by line? - Stack Overflow
How can you avoid it? Use other libraries for high performance async I/O like boost asio or native functions that are provided by...
Read more >Performance Tuning SQL Queries | Advanced SQL - Mode
But if you were talking about hundreds of thousands of rows or more, you'd see a noticeable improvement by aggregating before joining. When...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My immediate suggestions for performance gains are:
We currently use the more general algorithm that supports both ints and floats. However, by the time we need to draw a line, the points have been mapped to an integer space so float support is redundant.
We currently use Cohen-Sutherland for clipping a line to a bounding box, but the Liang-Barsky algorithm is considered significantly more efficient.
It would be nice to re-run those benchmarks now that #495 has been merged.