RFR: 8294821: Class load improvement for AES crypto engine [v2]

Xue-Lei Andrew Fan xuelei at openjdk.org
Mon Oct 10 17:43:52 UTC 2022


> Hi,
> 
> May I have the code clean up reviewed?
>  
> There is a lot of computation in AESCrypt class load, which could be avoid by using the computation result directly. The computation takes 6.971875 milliseconds in a MacOS M1 laptop. Although it is a one-time computation, but removing the computation could speed up java/jvm loading time by 6.971875 milliseconds without extra memory cost. 
> 
> Actually, because the computation result are used directly, the methods that supports the computation are no longer needed and the related static arrays are no longer needed.  This is the extra benefits to use the computation result directly, rather than computing on class initialization.
> 
> This patch does not change the logic except removing the pre-computation code and initializing the tables with the pre-computed result explicitly.  The existing regression and inter-op tests should be sufficient to ensure that the tables are correctly copied from the dumping of the old computation code results.
> 
> Except that, I also cleaned up some code warnings from the IDE I used.
> 
> Thanks,
> Xuelei

Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:

  add back final keyword and comments about where the tables are from

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/10568/files
  - new: https://git.openjdk.org/jdk/pull/10568/files/62d8f568..8105b8d8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10568&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10568&range=00-01

  Stats: 8 lines in 1 file changed: 5 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/10568.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10568/head:pull/10568

PR: https://git.openjdk.org/jdk/pull/10568



More information about the security-dev mailing list