tyoma / agge

Anti-Grain Evolution. 2D graphics engine for Speed and Quality in C++.
MIT License
117 stars 17 forks source link

Performance #6

Open projectitis opened 4 years ago

projectitis commented 4 years ago

Hi there!

Great to see this library :) I'm interested to know if you've done any performance comparisons between agg and agge that you'd be willing to share? Very interested to see what your improvements are!

Also, I note that on the surface you have cut down dramatically on the number of source files compared to the original. Is this because you have simplified it, or have you implemented only a subset of the original features?

All the best, Projectitis

tyoma commented 4 years ago

Hi there! I’ll start replying backwards)) The number of lines is significantly smaller bc it’s a complete rewrite. I greatly admire what Maxim have accomplished, but thought it would be hard to extend the lib without breaking anything, that’s why i have rewritten the parts i understood well with tests-first approach. So basically, it was my understanding, laziness and the necessity that shaped the feature set of the current library. It is commercially used in the software that I’m developing as my job - see cqg.com, the whole charting is implemented over agge - it’s the default engine there (in addition to gdi+, gdi and d2d) When I started i was comparing the performance to the original agg. What i’ve managed to achi e is 2x of the cell sorting performance and 3x line formation performance improvement to the original. Depending on specifics of your graphics youll get approximately that variance of performance boost. The rendererer has also improved, but that is the part that has never been implemented in simd in the original library so that is incorrect to compare them in that aspect (i still have only the basic solid color blender). What ive also done is the implementation of text rendering from the cached glyph masks. it’s memory intensive (statically) but allows for very efficient glyph rendering. And that has never been the part of the original lib. Iplan to make simd-based if the platform allows, but not earlier than I finish improvements to my other project - micro-profiler (I‘m now implementing custom ui there based on agge out of the performance issues with the standard win32 listview)