Python and STL efficiency

Ray ray_usenet at yahoo.com
Mon Aug 21 08:10:37 EDT 2006


Fredrik Lundh wrote:
> in the Python example, the four strings in your example are shared, so
> you're basically copying 40000 pointers to the list.
>
> in the C++ example, you're creating 40000 string objects.
>
> </F>

In which case, Licheng, you should try using the /GF switch. This will
tell Microsoft C++ compiler to pool identical string literals together.


:)




More information about the Python-list mailing list