David wrote:
- I'm using a std::map that will be filled with more than 10000 entries:
it's a private member of the class in the first case and a global in the
second case

That may be dumb, but are you sure that you reset your global data structures before or after your free function call. When using the class approach, your cleanup is automatic, but you may have forgotten something when switching to globals.

troy wrote:
Probably that you're not running the code that you think you are.  There
should be no difference between member function and free function in
this case, unless you're not telling us something.

FWIW, I also don't have any performance problems when using free functions, and I'd tend to agree with troy.

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to