]> git.wincent.com - wikitext.git/commit
Improve efficiency of _Wikitext_pop_all_from_stack
authorWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 12:50:31 +0000 (14:50 +0200)
committerWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 12:50:31 +0000 (14:50 +0200)
commitbc7f749565b83b4208090d543c55d68e47842d14
treee8ffdfac74fb4340be9c334124b1080ce7ba3285
parentefcb302501cfd3258474e25cd2f2e7b26360dc26
Improve efficiency of _Wikitext_pop_all_from_stack

Use a for-loop instead of repeatedly calling ary_entry inside
a while-loop. The simple integer comparison will be faster
than the function call. (And in any case, the
_Wikitext_pop_from_stack function which is called here will
do an ary_entry call anyway; so what's really happening here
with this change is that we call ary_entry once for each item
instead of twice.)

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/parser.c