Hi,
Thank you, done.
Tilman
On 15.03.2024 14:49, Guillaume Maillrd wrote:
Hi,
During a profiling session of my application, I found something that
could interest you.
To speedup the AFMParser (50% gain),
the "equals" in parseCharMetric should be written in this order (
order of top 5 usage) :
if (nextCommand.equals(CHARMETRICS_C)) {
...
} else if (nextCommand.equals(CHARMETRICS_WX)) {
...
} else if (nextCommand.equals(CHARMETRICS_N)) {
...
} else if (nextCommand.equals(CHARMETRICS_B)) {
...
} else if (nextCommand.equals(CHARMETRICS_L)) {
...
} ...
On my setup, it removes 80k calls to "equals".
Regards,
Guillaume
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org