25 Feb
2003
25 Feb
'03
10:24 p.m.
Hi On Monday 24 February 2003 13:03, Roberto Nibali wrote:
I'm not really surprised the macro expansion has performance problems. When I wrote that code only 6-8 macros existed, I've checked my table and it contains 51 entries. All looked up sequentially. Very bad performance wise.
Indeed.
Attached you'll find a patch which changes this to a faster algorithm. I have also tested it.
I'll give it a spin.
You can also test & try the attached "macro.c" which uses a hash function generated with gperf. In my tests the binary search made the macro expansion (4 macros in the template) about 2.5 times faster and the hash function (and some other minor changes) about 3 times. Achim