cmcfarlen opened a new pull request, #12624:
URL: https://github.com/apache/trafficserver/pull/12624

   Today I tried out Claude-code:
   
   The ts::Random class was creating new std::uniform_int_distribution and 
std::uniform_real_distribution objects on every call to random() and drandom(), 
which is inefficient.
   
   This change consolidates the random number generator state (engine and 
distributions) into a single thread_local State struct, so the distribution 
objects are created once per thread and reused across all calls.
   
   Performance impact:
   - Eliminates repeated construction/destruction of distribution objects
   - Maintains thread-safety through thread_local storage
   - Benchmark shows ~7% improvement in random() call performance
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   fixes #12620


-- 
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