Duplicate :
|
|
Relates :
|
|
Relates :
|
JDK-8179224 :
|
in Thread::create_vm we call CommandLineFlagRangeList::check_ranges() and CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterErgo) which together cause more than 302k strlen calls, a fraction of that strcmps for a total of about ~14M instructions, or 4% of the total, in a Hello World startup test (comparing a build where these calls are commented out). The cost is O(n*m), where n is the number of constraints and m is the total number of flags. While a very small regression (~0.5-1.5ms) there are a number of ways to improve this, such as sorting the constraints and flag table so that we could do the scan in O(n+m) time.
|