« Return to Thread: agg profiling

agg profiling

by Petr Kobalíček :: Rate this Message:

Reply to Author | View in Thread

Hi list,

does anybody profiled his application? Currently I have few ideas how
to improve rendering speed in antigrain, but I will be interested
about comments if this makes sense. I profiled my library and I see
very big usage of trigonometric functions. These functions are
generally slow, so here is first idea how to improve code.

Here are my all ideas:
- Instead of sin() and cos() use sincos() (is this portable?) in code
that needs both (mainly agg::curves, agg::arc)
- Ideally rewrite sin and cos implementation using SSE2
- Ideally rewrite agg::conv_curves using SSE2

Anybody tried something like this ? Maybe the idea of fixed point
calculation of curves isn't also bad.

Also the effective sin and cos in SSE2 will probably degrade the
function to accept only float, so it's question if this can affect
rendering quality. The implementation is for example here:
http://gruntthepeon.free.fr/ssemath/.

I tried also to write multithreaded rendering using antigrain and I
have half success. I wrote own rasterizer (located here
http://code.google.com/p/fog/source/browse/trunk/Fog/thirdparty/agg-contrib/include/agg_rasterizer_scanline_aa_custom.h)
and with this rasterizer I can collect spans for each scanline
indenpendently. This makes some performance gain, but the path
rasterizing algorithm still runs in main thread and unfortunatelly
this consumes quite lot of CPU cycles.

Cheers
- Petr

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general@...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general

 « Return to Thread: agg profiling