Version 1 of filesystem benchmarking

Updated 2003-12-20 21:25:27

Some aspects of Tcl's filesystem (glob, file, pwd, cd primarily) became a bit slower with the vfs layer that was introducedin Tcl 8.4.0. This has gradually been addressed with later Tcl 8.4.x releases and also with Tcl 8.5.x. The current timings are as follows:

000 VERSIONS
1:8.5a0 2:8.4.5 3:8.3.5
    001 FILE exec interp                              14848   14116   13033
    002 FILE exec interp: pkg require                 54447   69810   31033
    003 FILE exec interp: pkg require+                81868   98223   47400
    004 FILE exec interp: pkg require+auto_path       64340   85805   46400
    005 FILE exists tmpfile (obj)                        21      23       0
    006 FILE exists ~                                    14      21       0
    007 FILE exists! absolute tmpfile (obj)              17      18       0
    008 FILE exists! absolute tmpfile (str)             182     204     100
    009 FILE exists! relative tmpfile (obj)              22      18       0
    010 FILE exists! relative tmpfile (str)             343     363       0
    011 FILE exists! tmpfile (obj)                       20      21       0
    012 FILE exists! tmpfile (str)                      284     304     100
    013 FILE glob  tmpdir (30 entries) / -dir          5036    5102    4810
    014 FILE glob  tmpdir (30 entries) / cd            5600    5654    5010
    015 FILE glob  tmpdir (subset of 30 entries)       2544    4986    4800
    016 FILE glob / all subcommands                   75864   66918  106850
    017 FILE glob / atime                              7587    7933   12420
    018 FILE glob / attributes                        49489   51030   46160
    019 FILE glob / dirname                            5605    5865    5210
    020 FILE glob / executable                         9507    7489    6110
    021 FILE glob / exists                             7162    7465    6010
    022 FILE glob / extension                          5179    5265    5010
    023 FILE glob / isdirectory                        7562    7952   12310
    024 FILE glob / isfile                             7629    7916   12420
    025 FILE glob / mtime                              7522    7909   12420
    026 FILE glob / owned                              7526    7877   12520
    027 FILE glob / readable                          11612    7475    6110
    028 FILE glob / rootname                           5214    5262    5000
    029 FILE glob / size                               7634    7866   12320
    030 FILE glob / tail                               5307    5472    5110
    031 FILE glob / writable                          11624    7463    6010
    032 FILE glob deep dirs (30 entries+)             56694   57375   47870
    033 FILE glob deep dirs (subset of 30 entries+)   36232   56717   46170
    034 FILE glob dirs (30 entries)                    4872    4936   12320
    035 FILE recurse / -dir                          105758  111418  137990
    036 FILE recurse / cd                            130812  177122  135690
    037 FILE recurse+stat / -dir                     136036  146569  243150
    038 FILE recurse+stat / cd                       161960  212755  240540
    038 BENCHMARKS                                  1:8.5a0 2:8.4.5 3:8.3.5

(This is for a slightly modified version of file.bench, and a slightly modified version of Tcl 8.5a0 which is undergoing performance testing, where the above timings are on WinXP).

If you have particular pieces of code using file, glob which are slower in Tcl 8.4/8.5, please add them to this page so that they can be added to the benchmark suite.

Note: reading from and writing to files is a totally separate topic channel i/o which is nothing to do with the vfs changes made to Tcl 8.4.0, and is therefore irrelevant to this particular benchmarking exercise on this page.