[Commits] [wesnoth/wesnoth] 65570f: campaignd: Replace vector<pair<k, v>> with map<k, v>...
GitHub
noreply at github.com
Sat Jun 14 05:17:40 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 65570f5cb9e92f73a96d76c48654511dc1860b00
https://github.com/wesnoth/wesnoth/commit/65570f5cb9e92f73a96d76c48654511dc1860b00
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-06-14 (Sat, 14 Jun 2014)
Changed paths:
M src/campaign_server/campaign_server.cpp
M src/campaign_server/campaign_server.hpp
Log Message:
-----------
campaignd: Replace vector<pair<k,v>> with map<k,v> for the handlers table
std::vector<std::pair<k,v>> has worse look-up performance than
std::map<k,v> in general, not that the difference is too noticeable for
such a small dataset like campaignd's handlers table, that is built in
such a way its items are arranged in descending order of usage
frequency.
It still feels like this is the best thing to do to keep future
maintainers sane.
More information about the Commits
mailing list