In this video Charlie Hunt explains the history and implementation of this new feature. The video is not actually about Compact Strings. Compact Strings are only introduced as a case study to explain how with a lot of work, the three legged stool of, latency, throughput and memory footprint can all be improved together.
If you have the time I definitely recommend watching the whole video - although the actual part on Compact Strings start at 26:24.
If you want a 5 minute overview here are the highlights:
- String density (JEP 254 Compact Strings) is a feature of JDK 9.
- Aims were to reduce memory footprint without affecting any performance - latency or throughput as well maintaining full backward compatibility.
- JDK 6 introduced compressed strings but this was never brought forward into later JVMs. This is a complete rewrite.
- To work out how much memory could be saved 960 disparate java application heap dumps were analysed.
- Live data size of the heap dumps were between 300MB and 2.5GB.
- char[] consumed between 10% and 45% of the live data
- vast majority of chars were only one byte in size (i.e. ASCII)
- 75% of the char arrays were 35 chars or smaller
- On average reduction in application size would be 5-15% (reduction in char[] size about 35-45% because of header size)
- The way it will be implemented is that if all chars in the String use only 1 byte (the higher byte is 0) then a byte[] will be used rather than char[] (IS0-8859-1/Latin1 encoding). There will a leading bye to indicate which encoding was used.
- UTF8 not used because it supports variable length chars and is therefore not performant for random access.
- private final byte coder on the String indicates the encoding. Note the room to support many more encodings in the future.
- For all 64 bit JVMs no extra memory was needed for the extra field because of the 'dead' space needed for 8 byte object alignment.
- Throughput doesn't suffer as tested with 400 JMH benchmarks available online.
- The reason for this is that String is highly optimized in that there 55 specific JVM features for String alone.
- Latency also improved tested with industry benchmark SPECjbb2015 also regression tested on SPECjbb2005
- Feature can be enabled and disabled with -XX:+CompactStrings but will be enabled by default.
ReplyDeleteI agree with your thoughts!!! As the demand of java programming application keeps on increasing, there is massive demand for java professionals in software development industries. Thus, taking training will assist students to be skilled java developers in leading MNCs.
Java Training in Chennai
It is useful information, this Compact string type will give more performance like python provided.
ReplyDeleteJava Training in Chennai | JEE Training in Chennai | Spring Training in Chennai
This information is impressive; I am inspired with your post writing style & how continuously you describe this jdk9 concept. Thanks for sharing.. HP LR Training in Chennai | ALM Training in Chennai | UFT Training in Chennai
ReplyDeleteIt is useful information, this Compact string type will give more performance like python provided. Executive Protection
ReplyDeleteYou can also buy cheap reseller hosting in Pakistan from us. Softhof providing low cost web hosting in Pakistan, both cheap and reliable domain registration and webhosting services to our many satisfied customers. Softhof is one of the famous and oldest web hosting providers. Softhof offers best web hosting services in Lahore Pakistan, you can buy free domain with web hosting services from us.
ReplyDeleteWeb Hosting in Pakistan
Today, encouraged by this post I decided to give a try to Java 10 on the software my company is working on. Roughly speaking, it's an interpreter of exotic programming languages that is not particularly optimized and contains a lot of strings inside.
ReplyDeleteSurprisingly, Java 10 turned out to be A LOT slower than Java 1.8_171, and also eats a lot of memory. On hardest test, it eats 15% more total memory and is 19% slower!
Testing was done on Linux subsystem for Win 10, benchmarking performed with `/usr/bin/time -v `.
Why so?
P.S. hardest test runs continuously with 100% CPU usage on one thread for 20 min.
DeleteExcellent blog about java. Continue sharing more like this.
ReplyDeleteSpring Training in Chennai
Spring Training near me
Spring Hibernate Training in Chennai
Hibernate Training in Chennai
Hibernate Training institute in Chennai
Spring Hibernate Training
Struts Training in Chennai
Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
ReplyDeleteJava Training in Chennai
Java course in Chennai
Hadoop Training in Chennai
Python Training in Chennai
Java Training in Porur
Java Training in Adyar
Java Training in Tnagar
This is my first visit to your blog, keep writing more content.
ReplyDeleteLoadrunner Training in Chennai
JAVA Training in Chennai
Hadoop Training in Chennai
Selenium Training in Chennai
German Classes in chennai
French Classes in Chennai
french institute in chennai
I believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates.
ReplyDeleteSpoken English Classes in Chennai
Spoken English in Chennai
IELTS Coaching in Chennai
IELTS Coaching Centre in Chennai
IELTS Classes in Mumbai
IELTS Coaching in Mumbai
English Speaking Classes in Mumbai
English Speaking Course in Mumbai
Really immeasurable information for us... Thank you for presenting such wonderful details.
ReplyDeletePega Training in Chennai
Pega Course
Primavera Training in Chennai
Tableau Training in Chennai
Unix Training in Chennai
Job Openings in Chennai
Placement Training in Chennai
Linux Training in Chennai
JMeter Training in Chennai
Spark Training in Chennai
Pega Training in Anna Nagar
Nice Blog!! Thanks For Sharing! Keep update more information..
ReplyDeleteTally Course in chennai
Tally Course in Bangalore
Tally Training in Bangalore
Tally training in coimbatore
Tally course in madurai
Tally Course in Hyderabad
Tally Classes in Bangalore
Tally institute in Bangalore
Ethical hacking course in bangalore
Selenium Course in Bangalore
Nice Blog...Thanks for sharing the article waiting for next update...
ReplyDeleteArtificial Intelligence Course in Chennai
best artificial intelligence training in chennai
C C++ Training in Chennai
javascript training in chennai
Html5 Training in Chennai
QTP Training in Chennai
Spring Training in Chennai
DOT NET Training in Chennai
ReplyDeleteI have to agree with everything in this post. Thanks for useful sharing information.
Hadoop Training in Chennai
Hadoop Training in Bangalore
Big Data Course in Coimbatore
Big data course in bangalore
Big Data Course in Chennai
Big Data Training in Bangalore
Python Training in Bangalore
salesforce training in bangalore
hadoop training in marathahalli
hadoop training in btm
ReplyDeleteI liked the way of your writing, and interesting blog post so keep posting, thank you.
best maths coaching in Delhi
best maths coaching near me
maths classes near me
maths classes in Delhi
maths classes near me
maths institute in Delhi
maths tuition in Delhi
maths coaching near me
maths coaching in Delhi
Thank you very much for a complete example. I have been struggling with this for two days and all other examples were either incorrect or incomplete. thanks for ur efforts and work
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Battle through history and build up a great empire! Start play play forge of empires online at this point!
ReplyDeleteWonderful blog. Keep on blogging to get new information.
ReplyDeletestrategic crm
importance of artificial intelligence
where is python language used
why cloud computing is used
oracle interview questions and answers
data science questions and answers pdf
Great post and I am very happy to see this blog. Good job...!
ReplyDeletePrimavera Training in Chennai
Embedded System Course in Chennai
Embedded Training in Coimbatore
Spark Training Institute in Chennai
Primavera Course in Chennai
I am very impressed to see this blog thanks for giving this very useful information.
ReplyDeletepython best tutorial
free python tutorial
Aivivu chuyên vé máy bay, tham khảo
ReplyDeletevé máy bay đi Mỹ bao nhiêu tiền
vé máy bay từ bangkok đi hồ chí minh
giá vé máy bay từ huế đi hà nội
dat ve may bay di nha trang
giá vé máy bay đà nẵng đi đà lạt
dịch vụ xe đưa đón sân bay
combo du lịch nha trang
Searching for a career in cybersecurity?
ReplyDeleteLook no further than Indian Cyber Security Solutions for Certified Ethical Hacking Training. Our training programme is created to provide you the theoretical understanding, hands-on expertise, and certification necessary to be successful in this highly demanded industry.
Our training is meticulously crafted and taught by seasoned experts with a wealth of experience. You'll learn the latest techniques, tools, and methodologies used by professional ethical hackers while gaining hands-on experience through real-world scenarios. Sharpen your problem-solving abilities and unleash your potential as a certified ethical hacker.
Join us today to embark on a transformative journey towards an exciting career in cybersecurity!
Take a step towards a rewarding career in cybersecurity with our Ethical Hacking
ReplyDeletetraining course in Bangalore. Acquire the knowledge and skills needed to identify vulnerabilities and safeguard critical information.
Transform your passion for cybersecurity into a rewarding career with our Ethical hacking Training in Kolkata. Our comprehensive curriculum covers the latest industry trends and best practices, empowering you to protect organizations from cyber threats effectively.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete