Matt Warren 9/19/2016

Compact strings in the CLR

Read Original

This technical article analyzes how strings are stored as UTF-16 in the .NET CLR and proposes a 'compact strings' implementation. It argues that many strings in real-world applications (like URLs, HTTP headers) are ASCII-compatible, and storing them in a 1-byte-per-character encoding could save significant memory. The post includes a compelling case study using a memory dump from Stack Overflow, showing potential compression of string data from over 3.5 GB to under 1.9 GB.

Compact strings in the CLR

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser