Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6d338c02526152fbb0b5bee9e92f276c94bdf9eeccbb4c03fa53976b580c957f
Ticket: 62019f8aa9f5ec73743be6f7d90f3b346c8cd29b
Performance penalty by creation of interp compared to old versions
User & Date: sebres on 2025-07-22 16:48:56
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Working on the fix for use-after-free bug, I noticed that there is performance penalty by creation (and/or deletion) of interp.
    
    Here is the comparison <b style="color:red">9.0 (-)</b> vs <b style="color:green">8.6 (+)</b>:
    
    <code><pre>
      % timerate {interp create i; interp delete i} 5000
    <b style="color:red">- 3574.98 µs/# 1398 # 279.72 #/sec 4997.816 net-ms</b>
    <b style="color:green">+ 1756.77 µs/# 2846 # 569.23 #/sec 4999.777 net-ms</b>
    <br>  # still worse it looks with safe interp:
      % timerate {interp create -safe i; interp delete i} 5000
    <b style="color:red">- 1228.34 µs/# 4070 # 814.11 #/sec 4999.341 net-ms</b>
    <b style="color:green">+ 460.025 µs/# 10869 # 2173.8 #/sec 5000.009 net-ms</b>
    </pre></code>
    
    However 8.7 seems to have the same "bottleneck" (although a bit faster).
    
    I had a 9.x-based branch with lazy load of clock, OO and few other stuff... it is significantly faster, but anyway a bit slower than 8.6...
    
    Since I don't have time right now to profile it, but it looks significant, I let it here as a ticket.
    
  5. foundin changed to: "9.0+"
  6. is_private changed to: "0"
  7. login: "sebres"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "50e9528765c18296566374b3fde2df942c394efd"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "sebres"
  14. subsystem changed to: "38. Init - Library - Autoload"
  15. title changed to:
    Performance penalty by creation of interp compared to old versions
    
  16. type changed to: "Bug"