Back to Zing Documentation Home

Use Compact Strings

Zing Virtual Machine supports JEP 254, the compact strings optimization.

The compact strings feature of the Zing Virtual Machine lowers memory footprint, improves performance of string-intensive applications, and reduces time spent on garbage collection.

To enable or disable the feature, use the following option:



Compact strings change internal representation of all strings from char[] to byte[], and changes the String class layout. If your application accesses java/lang/String fields via reflection or is unsafe, you may observe incorrect application behavior.



See Also

© Azul Systems, Inc. 2020 All rights reserved.

Privacy Policy | Legal | Terms of Use