Performance imp (for nested loops and many vars)
Status: Beta
Brought to you by:
nulidex
Hi Andrei,
the current code copies on every loop-entry all of the variables into a new map, so that it can overwrite parent vars with local variables.
That is exponential complexity - too much in my case.
Here I propose using a chainable map - which brings the complexity as far as loop-nesting and variables are concerned.
Thanks for providing this code, it has helped us get up to speed quickly!
Cheers,
Georg
Georg,
Do your tests pass with the patch? I ran this with GCC 4.4.5, and I get segmentation faults when trying to create a reference test file, as in: ./test create t/loop.tmpl
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Andrei,
currently I don't have a dev environment for Linux, sorry.
At the time it was running well, even in production. I really don't remember if I ran the tests! But certainly if I didn't run them, than because they didn't work right from the start. I guess you checked for that already. ; )
I am not joking about the speed : )
Best regards,
Georg