propose to change the internal representation of the String class from a UTF-16 char array to a byte array plus an encoding-flag field. The new String class will store characters encoded either as ISO-8859-1/ Latin-1 (one byte per character), or as UTF-16 (two bytes per character), based upon the contents of the string. The encoding flag will indicate which encoding is used. …. http://openjdk.java.net/jeps/254
Unicode strings: - compact ascii: … - compact: … - legacy string, not ready: … - legacy string, ready: … Compact strings use only one memory block (structure + characters), whereas legacy strings use one block for the structure and one block for characters. https://github.com/python/cpython/blob/3.5/Include/unicodeobject.h
interpreter is now about 7% faster due to optimized instruction decoding. Based on patch by Demur Rumed. •Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode. Patch by Demur Rumed.
оптимизаций • Оптимизации ориентированы на “средний” случай • Возможность для дальнейших оптимизаций есть, над ними работают и они будут • Оптимизации могут мешать корректным замерам