Adriano Machado created CAMEL-26471:
---------------------------------------

             Summary: camel-util - StopWatch.taken: convert to millis without a 
Duration
                 Key: CAMEL-26471
                 URL: https://issues.apache.org/jira/browse/CAMEL-26471
             Project: Camel
          Issue Type: Sub-task
            Reporter: Adriano Machado
            Assignee: Adriano Machado
             Fix For: 4.24.0


Tier 3 item of CAMEL\-25132, in the first group of its suggested order. 
{{StopWatch.taken\(\)}} converts nanoseconds to milliseconds with 
{{Duration.ofNanos\(delta\).toMillis\(\)}}, which allocates a Duration unless 
escape analysis removes it. {{TimeUnit.NANOSECONDS.toMillis\(delta\)}} gives 
the same value without depending on that. The gain is small: about 0.6 ns and 
no allocation once compiled by C2, 24 bytes per call before that.

_Claude Code on behalf of Adriano Machado \(@ammachado\)_

_This was generated by an AI agent and may contain inaccuracies. Please verify 
before relying on it._





--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to