Skip to content
Tcl Source Code Update of ”Faster UTF encoding”
Login

Update of ”Faster UTF encoding”

Overview

Artifact ID: e4245a202886e171474a70589e0bc14d9f69726096c353a83ca9473a2b3d6db1
Page Name:Faster UTF encoding
Date: 2026-02-24 15:49:20
Original User: apnadkarni
Mimetype:text/x-markdown
Next 5523e62e05293dc2b84b884a2312488b687a8bf4c2f84a024311fa96ddc7980b
Content

Explanatory text forthcoming...

Benchmarks (times in microseconds)

apn-utf-fastpath branch...

c:\src\tcltk\wip\tcl\win>Release_AMD64_VC1944\tcltest91.exe utfbench.tcl 10000
Calibrating...0.03633541899879032 µs/#-overhead 0.037819 µs/# 51613951 # 26441573 #/sec

                                      convertto  convertfrom         puts         read
 ascii (10000)                            6.721        6.587        6.055        6.881
 western (10000)                         13.247       13.323       12.536       13.921
 cyrillic (10000)                        65.343       70.621       63.727       72.637
 eastern (10000)                         81.155       88.541       79.834       91.147
 western - pathological (10000)          60.158       61.249       59.822       62.990
 cyrillic - pathological (10000)         59.327       60.862       57.919       66.279
 eastern - pathological (10000)          64.834       67.425       63.501       69.091

Compare with current trunk...

c:\src\tcltk\main\tcl\win>Release_AMD64_VC1944\tcltest91.exe ..\..\..\wip\tcl\win\utfbench.tcl 10000
Calibrating...0.0345694057395217 µs/#-overhead 0.035182 µs/# 55482315 # 28423317 #/sec

                                      convertto  convertfrom         puts         read
 ascii (10000)                           22.834       22.802       22.279       23.333
 western (10000)                         25.434       25.694       24.925       26.320
 cyrillic (10000)                        65.016       70.840       64.997       72.914
 eastern (10000)                         92.401       96.693       92.304      101.501
 western - pathological (10000)          48.926       52.301       49.131       53.466
 cyrillic - pathological (10000)         48.742       52.250       49.659       53.592
 eastern - pathological (10000)          58.243       59.968       56.589       62.204