Hi Steve, Could you please describe in more details in what cases do you expect a profit? AFAIK UTF-8 requires 1 byte for Latin-1 characters.
I did not learn in depth about aforementioned Java 9 compact strings but my understanding is that it is about reducing space taken by java.lang.String objects in a Java heap memory. 2020-06-02 11:37 GMT+03:00, steve.hostett...@gmail.com <steve.hostett...@gmail.com>: > Hello, > > The method doWriteString(@Nullable String val) writes everything in UTF-8. > This is a bit a waste because with Java 9+ > <https://openjdk.java.net/jeps/254> , strings are optimised and if all > chars are ISO-LATIN-1 all char are represented with 1 byte instead of two. > I > would consider creating 2 type of strings : One with type 0x9 that behaves > as it does currently and another 0x39 that checks that s.getBytes().length > == s.length() > > what do you think? > > > > -- > Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/ > -- Best regards, Ivan Pavlukhin