[Commits] [wesnoth/wesnoth] d2fe8d: optimize parser
GitHub
noreply at github.com
Fri Jun 13 16:00:07 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: d2fe8d1e3f5df08ab137f3a4a4fa334a0f3f818c
https://github.com/wesnoth/wesnoth/commit/d2fe8d1e3f5df08ab137f3a4a4fa334a0f3f818c
Author: Chris Beck <render787 at gmail.com>
Date: 2014-06-13 (Fri, 13 Jun 2014)
Changed paths:
M src/serialization/parser.cpp
Log Message:
-----------
optimize parser
According to valgrind, the tokenizer::next_token function is called
several million times during a typical unit test. This commit
changes the parser to allocate the tokenizer as a member variable
of the class (on the stack) rather than on the heap using new,
thus it eliminates millions of calls to new.
More information about the Commits
mailing list