Discussion:
[Sodipodi-list] [libnr] some optimizations
Oleg Verych
2005-06-09 02:16:26 UTC
Permalink
-- Description --
Patch against sodipodi 0.34 in Debian GNU+Linux.
Optimized local varables, reduced stack usage of recurcive
calls, (IMHO) better perfomance. Got ride of "gotos", see
<http://www.acm.org/classics/oct95/>
Size of object files is the same:

***@czluon:libnr$ size *goto
text data bss dec hex filename
13622 20 0 13642 354a nr-path.o-goto
16750 20 8 16778 418a nr-pathops.o-goto
8644 0 0 8644 21c4 nr-stroke.o-goto
***@czluon:libnr$ size nr-path.o nr-pathops.o nr-stroke.o
text data bss dec hex filename
13638 20 0 13658 355a nr-path.o
16766 20 8 16794 419a nr-pathops.o
8612 0 0 8612 21a4 nr-stroke.o
***@czluon:libnr$ echo goto: $((13642+16778+8644))
goto: 39064
***@czluon:libnr$ echo not : $((13658+16794+8612))
not : 39064
***@czluon:libnr$

Lauris Kaplinski, that was code based on libart (with that gotos ;)

Comments are welcome.

Loading...