Tcl Source Code

View Ticket
Login
2026-03-13
02:48 • Closed ticket [8994c972ad]: Performance regression in the expr in/ni operator in... artifact: d7b336e3e8 user: apnadkarni
2026-03-12
10:15
Merge 9.0 - Fix [8994c972ad] - performance regression in expr in/ni check-in: 50bd1ec20b user: apnadkarni tags: trunk, main
10:12
Fix [8994c972ad] - performance regression in expr in/ni check-in: 098454046c user: apnadkarni tags: core-9-0-branch
2026-03-11
15:45 • Ticket [8994c972ad] Performance regression in the expr in/ni operator in Tcl 9</... artifact: 61ce386607 user: apnadkarni
15:43
Bug [8994c972ad] - Tcl 9 expr in/ni performance regression closed check-in: 9893f7e1e7 user: apnadkarni tags: bug-8994c972ad
14:03 • Ticket [8994c972ad] Performance regression in the expr in/ni operator in Tcl 9</... artifact: f7c14d24a8 user: apnadkarni
14:02 • New ticket [8994c972ad]. artifact: 7c8dcbb81b user: apnadkarni

Ticket UUID: 8994c972ad3df0aff53739fce486e39809a7b752
Title: Performance regression in the expr in/ni operator in Tcl 9
Type: Bug Created on: 2026-03-11 14:02:52
Submitter: apnadkarni Assigned to: nobody
Subsystem: 16. Commands A-H Severity: Important
Priority: 5 Medium Last modified: 2026-03-13 02:48:13
Status: Closed Closed by: apnadkarni
Resolution: Fixed Closed on: 2026-03-13 02:48:13
Version: 9.0
Description:

Compare 8.6

% timerate -calibrate {}
0.03480732249997189 µs/#-overhead 0.035377 µs/# 55176756 # 28266780 #/sec
% set l [lrepeat 1000 x]; timerate {expr {"a" in $l}}
6.619428 µs/# 150279 # 151070 #/sec 994.761 net-ms

with 9.0

% package req Tcl
9.0.2
% set l [lrepeat 1000 x]; timerate {expr {"a" in $l}}
9.195111 µs/# 108328 # 108753 #/sec 996.088 net-ms
User Comments:
apnadkarni added on 2026-03-11 15:45:53:

Proposed fix in 9893f7e1e7.

 timerate -calibrate {}
0.03631045936580007 µs/#-overhead 0.036670 µs/# 53231733 # 27270355 #/sec
% package req Tcl
9.0.4
% set l [lrepeat 1000 x]; timerate {expr {"a" in $l}}
4.169346 µs/# 237791 # 239845 #/sec 991.433 net-ms