20.10.18 16:01, Stefan Behnel пише:
But regarding the use under Windows, I
wonder if there's interest in keeping it as a special Windows-only feature,
e.g. to speed up the data exchange with the Win32 APIs. I guess it would
have to provide a visible (performance?) advantage to justify such special
casing over the code removal.

This is an interesting question, and we should found the answer right now. Should PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() continue to attach the wchar_t representation to the unicode object on Windows? The cost is higher memory consumption and slower first time call. The benefit is faster following calls for the same object. Although they still need to copy the content, so the time is still O(N), just with smaller constant multiplier.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to