rajat315315 commented on PR #6721:
URL: https://github.com/apache/jmeter/pull/6721#issuecomment-5002722873

   **_Benchmarking Results_**
   
   | Sibling Count | Tree Depth | Without Change (`traversal`) | With Change 
(`compilerLookup`) | Speedup | Allocation Rate (Without) | Allocation Rate 
(With) |
   | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
   | 1 | 2 | 215.899 ns/op | 5.939 ns/op | **36.3x** | 224 B/op | **0 B/op** |
   | 1 | 5 | 370.216 ns/op | 4.269 ns/op | **86.7x** | 248 B/op | **0 B/op** |
   | 1 | 10 | 791.889 ns/op | 6.977 ns/op | **113.5x** | 288 B/op | **0 B/op** |
   | 10 | 2 | 686.411 ns/op | 5.292 ns/op | **129.7x** | 224 B/op | **0 B/op** |
   | 10 | 5 | 1818.898 ns/op | 5.649 ns/op | **321.9x** | 248 B/op | **0 B/op** 
|
   | 10 | 10 | 3191.963 ns/op | 5.318 ns/op | **600.2x** | 288 B/op | **0 
B/op** |
   
   *Note: All execution times represent average time per operation. Lower is 
better.*
   #### Key Takeaways
   1. **Constant-Time Lookup**: The old tree-traversal approach scales linearly 
with the size, depth, and width of the test plan (taking over **3.1 
microseconds** on a larger plan). The new map-lookup approach runs in constant 
time (**~4–7 nanoseconds**) regardless of the tree configuration.
   2. **Zero GC Pressure**: The old tree-traversal allocated between **224 and 
288 bytes** per operation on the heap to track path traversal state. The 
optimized lookup does not allocate any heap memory (**0 B/op**). 
    
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to