Skip to content

loveu8/openjdkPractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

OpenJDK 10 Practice Project

UNIT 1 Test Local-Variable Type Inference (var)

We can see the test result.
Old mean use old java variable defined. New mean all use var.
Avg Cost Time (ms) : When you use more var. According to different object forms. It may the average execution time per second increase. However, some are reduced.
Avg Use Memory (MB) : Basically the test results will not differ too much. Unless you have a large number of executions, you can reduce the use var.

typeavgCostTime(ms)avgUseMemory(MB)runtimelooptime
OldArrayList33100000100
NewArrayList12100000100
OldLinkedList144100000100
NewLinkedList124100000100
OldHashMap1410100000100
NewHashMap2010100000100
OldLinkedHashMap1310100000100
NewLinkedHashMap2610100000100
OldHashSet98100000100
NewHashSet188100000100
OldLinkedHashSet179100000100
NewLinkedHashSet249100000100
OldIntAdd00100000100
NewIntAdd00100000100
OldBigDecimalAdd03100000100
NewBigDecimalAdd03100000100
OldString962810000100
NewString912910000100
OldStringBuilder22100000100
NewStringBuilder12100000100
OldThread700610000100
NewThread695610000100
OldHttps1173510100
NewHttps1001510100

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages