Commit Graph

2 Commits

Author SHA1 Message Date
fibrechannelscsi
2d052a0826 An additional benchmark for KeyPath read performance. (#61795)
* Added a benchmark for KeyPaths where trivially-typed memory is preceded by non-trivially-typed memory.

* Reduces the workload of run_KeyPathClassStructs by a factor of 4.

The reported time was 1847 us.
2022-11-07 16:52:25 -06:00
fibrechannelscsi
730bf24035 Add benchmarks that measure KeyPath read and write performance. (#60383)
* Add benchmarks that measure KeyPath read and write performance.

* Added setUpFunctions. Revised number of iterations per benchmark.

* Include n as a factor in the number of iterations.

* Increased number of iterations for KeyPathDirectAccess by a factor of 25.

* One last tweak to the number of iterations on testDirectAccess to get them above 20 us.

* Made revisions based on feedback. Added three new benchmarks.

* Added benchmarks to exhaustively benchmark all KeyPathComponent types. Removed benchmarks dealing with an inlining issue.

* Wrapped additional keypaths with identity() where needed. More cleanup and documentation.

* Moved KeyPaths for KeyPathRead and Write into FixedSizeArrayHolder. Renamed GetSet to Getset.

* Added inline(never) to both versions of getKeypathToElement().

* Moved identity() wraps so that they're called once per variable per benchmark.

* Moving destinationKeyPaths into FixedSizeArrayHolder to try to reduce long setup overhead errors.

* Additional moving of the identity() wrapping into the singleton's init() to try to reduce setup time errors.
2022-08-24 13:55:05 -05:00