-
Notifications
You must be signed in to change notification settings - Fork 105
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
Performance is ~10-30x worse than Cairo #147
Comments
Any idea on what the bottleneck might be? Comparable performance would be a long-term goal. |
Thanks for the benchmark comparison. |
Yes, it does seem to be the raster code (*RGBAPainter).Paint
Collected using the testing package's built-in profiling:
The Cairo counterparts ( |
Perhaps this doesn't qualify as an issue per-se, but I wanted to use draw2d as the renderer in my program (instead of Cairo). However, even in simple cases, draw2dimg performs at least 10-30x worse than the equivalent Cairo code via cgo.
Maybe I'm doing something wrong? (I hope so)
Simple benchmark test below draws filled squares with an outline, performing ~30x worse on draw2d than Cairo. When the drawn surface is 1:1 blitted to another surface, the gap closes to ~10x
Results:
The README says that draw2d is a pure-go alternative to Cairo, but unfortunately the performance difference is too high for my use-case.
The text was updated successfully, but these errors were encountered: