JDK-8237807 : Store command-line flags in a hashtable
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2020-01-24
  • Updated: 2020-08-06
  • Resolved: 2020-08-06
Related Reports
Duplicate :  
Relates :  
Description
Currently JVMFlag::find_flag() does a linear search over 1000 flags. To speed up the processing of "java -XX" command-line flags, we should store these flags in a hashtable.

Preferably the hashvalues should be computed at build time, so the run time cost of setting up the table can be minimized.
Comments
See this post for a sample macro that can compute string hash at C++ compilation time https://stackoverflow.com/questions/28654707/how-to-calculate-the-hash-of-a-string-literal-using-only-the-c-preprocessor
24-01-2020