Hi Sandeep,<br><br><div><span class="gmail_quote">2007/10/28, Sandeep Agrawal <<a href="mailto:sandeep.a@samsung.com">sandeep.a@samsung.com</a>>:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>Actually I am unable to generate profiling data because of certain problems<br>with the platform I am working on. I don't have permissions to create a new<br>device and so opcontrol --init fails.<br><br>I am new to the text rendering field. Since Monahans does not have an FPU, I
<br>made the assumption that the affine transformations happening in floating<br>point may be optimized to work in fixed point. Am I wrong in my assumption?</blockquote><div><br class="webkit-block-placeholder"></div><div>
you would probably be able to optimize the speed of the affine transformation itself, let's say by a factor of 2 (at the cost of reduce precision). However, if this operation only corresponds to say, 5% of your running time, this will only gain you
2.5% of overall time; not necessarily a big win for what could be a lot of work.</div><div><br class="webkit-block-placeholder"></div><div>please, please use a profiling tool, it will guide you to optimization opportunities. more precisely, it will guide you to the low-hanging fruits, because profile-based optimization usually leads you to some sort of "plateau" which can only be broken by changing your internals drastically.
</div><div><br class="webkit-block-placeholder"></div><div>if you *absolutely* cannot run a profiling tool, I advise you to write profiling tests that basically run the same operation in loops, only varying one parameter at a time. (yes, I'm assuming that you can at least make time measurements in your program).
</div><div><br class="webkit-block-placeholder"></div><div>for example, what is the time to draw 1 glyph, then the time to draw 2, 5, 10, 50, 100 ?</div><div>do these number scale linearly if all glyphs are identical ? is there a "setup time" that is consistently larger than the increment between two glyph counts ?
</div><div><br class="webkit-block-placeholder"></div><div>what is the time to to draw a string of text at 10pt, 12pt, 14, etc... given that the amount of pixels to be filled grows roughly in n^2 (where n is the size), does the timing follow a similar curve ?
</div><div><br class="webkit-block-placeholder"></div><div>what is the cost of rotating text ? what's the function of performance/angle, etc...</div><div><br class="webkit-block-placeholder"></div><div>this kind of tests can give you significant information about what's slow and what isn't in a given library, and they're usually pretty easy to write.
</div><div><br class="webkit-block-placeholder"></div><div>and since you also have the Cairo sources to play with, feel free to put time measurements within the library itself to get smaller grained estimates.</div><div><br class="webkit-block-placeholder">
</div><div>maybe that doesn't sound glamorous, but given the conditions you describe, I'm pretty certain it will prove to be more fruitful than a random quest for local optimizations...</div><div><br class="webkit-block-placeholder">
</div><div>hope this helps,</div><div><br class="webkit-block-placeholder"></div><div>- David Turner</div><div><br class="webkit-block-placeholder"></div><div> </div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
If so can you please give some hints as to where I can perform<br>optimizations? I am sure that it would be possible to do some processor<br>specific optimizations as well as Cairo has been written to cater to a large<br>
community.<br><br>Thanks.<br>Sandeep Agrawal,<br>Wireless Terminal Division,<br>Samsung India Software Operations.<br><br>-----Original Message-----<br>From: Dan Amelang [mailto:<a href="mailto:daniel.amelang@gmail.com">daniel.amelang@gmail.com
</a>]<br>Sent: Saturday, October 27, 2007 12:46 AM<br>To: Sandeep Agrawal<br>Cc: <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>Subject: Re: [cairo] Regarding Cairo Optimization for ARM PXA320<br>
<br>On 10/26/07, Sandeep Agrawal <<a href="mailto:sandeep.a@samsung.com">sandeep.a@samsung.com</a>> wrote:<br>><br>> I am currently optimizing text rendering in Cairo for the PXA320 Monahans<br>> processor.
<br>><br>> I just want to know that is it possible to convert the double computations<br>> (specifically affine) to 16.16 or 26.6 fixed point format (any chance of<br>> overflow or precision loss?)<br><br>Yes, there is a chance of overflow and precision loss.
<br><br>> or do I have to go with processor specific<br>> assembly optimizations?<br><br>I don't see how this is an either/or situation. How did converting<br>doubles to fixed-point and using assembly optimizations become your
<br>two options for text rendering improvement?<br><br>I assume that your profiles show that floating-point emulation is the<br>bottleneck? Can you share with us your data?<br><br>Dan<br><br>_______________________________________________
<br>cairo mailing list<br><a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br><a href="http://lists.cairographics.org/mailman/listinfo/cairo">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</blockquote></div><br>