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
Great Article Image Processing Projects Deep Learning Projects for Final Year JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
DeleteIt 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
The information you have posted is very useful. The sites you have referred was good. Thanks for sharing... UP Ration Card Status
ReplyDeleteThis 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
Thank you so much for such valuable information sharing. It’s highly appreciated.
ReplyDeleteMicrosoft Azure Admin Training in Chennai
Microsoft Azure Admin Training
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
Given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :
ReplyDeleteCara menyembuhkan pembengkakan hati
Cara menyembuhkan fibrosis paru
Cara mengobati jantung berdebar
Cara mengobati impetigo
Cara mengobati lambung bocor secara alami
Obat kerumut tradisional
Cara mengobati sinusitis secara alami
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
Thanks for your blog... It is more useful for us...
ReplyDeleteData Science Courses in Bangalore
Data Science Training in Bangalore
Data Science Certification in Bangalore
Tally course in Madurai
Software Testing Course in Coimbatore
Spoken English Class in Coimbatore
Web Designing Course in Coimbatore
Tally Course in Coimbatore
Tally Training Coimbatore
very good post!!! Thanks for sharing with us... It is more useful for us...
ReplyDeleteSEO Training in Coimbatore
seo course in coimbatore
RPA training in bangalore
Selenium Training in Bangalore
Java Training in Madurai
Oracle Training in Coimbatore
PHP Training in Coimbatore
Awesome blog. I would thank the blog admin for sharing this info with us.
ReplyDeleteIELTS Coaching in Mulund
IELTS Training in Mulund West
IELTS Courses in Mulund
IELTS Coaching Centres in Mulund
IELTS Centres in Mulund East
This is really a valuable post... The info shared is helpful and valuable. Thank you for sharing.
ReplyDeleteAviation Academy in Chennai
Air hostess training in Chennai
Airport management courses in Chennai
Ground staff training in Chennai
Medical coding training in Chennai
Fashion designing courses in Chennai
Interior design courses in Chennai
Thanks for posting this. Its really informative.
ReplyDeleteGerman Classes in Chennai
German Training in Chennai
IELTS Coaching in OMR
TOEFL Coaching Centres in Chennai
french classes
pearson vue
German Courses in Chennai
German classes in Anna Nagar
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
Really a awesome blog for the freshers. Thanks for posting the information.
ReplyDeletebusiness card price in india
online paper bag printing india
desktop rental in chennai
macbook for rent in chennai
online company registration in india
company registration consultants in india
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
I read this blog, Nice article...Thanks for sharing waiting for the next...
ReplyDeletecore java training in chennai
core java training institutes in chennai
Best core java Training in Chennai
core java training in anna nagar
core java training in vadapalani
C C++ Training in Chennai
javascript training in chennai
Hibernate Training in Chennai
LoadRunner Training in Chennai
Mobile Testing Training in Chennai
Really a awesome blog for the freshers. Thanks for posting the information.
ReplyDeletecontent writing course in chennai
content writing training in chennai
german language course
IELTS Training in Chennai
Japanese Language Course in Chennai
TOEFL Training in Chennai
pearson vue
German Classes in Anna Nagar
Spoken English Classes in Anna Nagar
Excellent blog, keep sharing this blog. This blog contains full of usefull information..
ReplyDeleteDOT NET Training in Chennai
DOT NET Training in Bangalore
DOT NET Training Institutes in Bangalore
DOT NET Course in Bangalore
Best DOT NET Training Institutes in Bangalore
DOT NET Institute in Bangalore
DOT NET Training Institute in Marathahalli
PHP Training in Bangalore
Spoken English Classes in Bangalore
Data Science Courses 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
Great efforts put to publish these kinds of articles that are very useful to know. I’m thoroughly enjoying your blog. And Good comments create great relations. You’re doing an excellent job. Keep it up.
ReplyDeleteMagento Development Training Course in Chennai Zuan Education
Selenium Training Course in Chennai Zuan Education
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
Thank you for sharing such valuable post.
ReplyDeletebest digital marketing company
professional seo services
internet marketing company
digital marketing for banks
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!
ReplyDeleteCoach Outlet Online
ReplyDeleteMichael Kors Bags Outlet
Cheap Real Yeezys
Cheap Yeezys
Michael Kors Purse Outlet
Coach Outlet Store Online
MK Outlet
Coach Bags Clearance
Coach Bags Outlet
Great information. The above content is very interesting to read. This will be loved by all age groups.
ReplyDeletehow to convert list to string in python
data structures using python
polymorphism in oops
numpy in python
python interview questions and answers for testers
convert string to list python
Wonderful 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
It's a good chance to know more about these stories, very interesting and meaningful. And please take a look at this site, where I find the all the information I need about celeb networth
ReplyDeleteNice blog! Thanks for sharing this valuable information
ReplyDeleteDevOps Training in Bangalore
Devops Training in Pune
Thanks for sharing the informative data. Keep sharing…
ReplyDeleteSwift Developer Training in Chennai
Learn Swift Online
Swift Training in Bangalore
Thank you for this blog. Share more like this.
ReplyDeleteAWS Training in Chennai
AWS Online Training
AWS Training in Bangalore