John Ralls <jra...@ceridwen.us> writes: > A very good catch indeed. But pre-constructing the string in > qofbook.cpp only saves two string constructions per invocation as the > vector still has to make its own copies. I guess that its much worse > for you because the ancient gcc on Ubuntu 14.04 (gcc4.8) doesn't do > small-string optimization.
Is there any reason we cant use std::string& in the vector? Or do we think that we might lose references there? > KVP paths aren't really a good use for std::string anyway: It's a lot > of weight for something that's used as a human-readable index. Even > static char[] is heavy for this purpose. We could get a huge boost if > we use something like Glib's quarks [1]. They can be expanded to their > string value for storage so that we don't break file/db compatibility. > > Want to have a go at that? -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH warl...@mit.edu PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel