XOTcl Is Not Snit
Sarnold 2005-10-05 -- I am trying to emulate snit with an XOTcl class...
What : Xoins Where : http://sarnold.free.fr/abandon/xoins.zip Version : 2006-02-20 v0.5, patchlevel 1 Description : Xoins is a package emulating snit with the same syntax. A great speed improvement is achieved by building types as XOTcl classes. Switching from snit types, widgets and widgetadaptors may only require a 'package require xoins', and then renaming 'snit::type' to 'xoins::type', widget and widgetadaptor require the same process, maybe more transformations if you are unlucky.
Has the speed improvement been quantified? Are there examples? - escargo 29 Sep 2006.
There are two examples and a snit vs xoins benchmark in the .zip file. xoins typically is twice faster than snit, and much more for object instanciation. - Sarnold 1 Oct 2006
schlenk Is this vs. snit 1 or the Tcl 8.5 using snit 2 (which is much faster in some operations)? And with which XOTcl version did you test.
Sarnold All benchmarks are done using XOTcl 1.3.8. You may expect more speed with newer versions. Here are benchmarks with Snit 1 and Tcl 8.4:
Snit vs Xoins Creation and destruction...(using %AUTO%) Snit : 915.66 microseconds per iteration Xoins : 174.62 microseconds per iteration Creation and destruction... Snit : 896.98 microseconds per iteration Xoins : 162.39 microseconds per iteration Method call (not delegated) Snit : 21.545 microseconds per iteration Xoins : 13.371 microseconds per iteration Method call (delegated) Snit : 19.203 microseconds per iteration Xoins : 14.197 microseconds per iteration Option setting Snit : 22.154 microseconds per iteration Xoins : 8.39 microseconds per iteration Option setting (delegated) Snit : 73.192 microseconds per iteration Xoins : 34.263 microseconds per iteration Option getting Snit : 12.784 microseconds per iteration Xoins : 4.883 microseconds per iteration Option getting (delegated) Snit : 26.001 microseconds per iteration Xoins : 15.372 microseconds per iteration
With Tcl 8.5a2 and Snit 2:
Snit vs Xoins Creation and destruction...(using %AUTO%) Snit : 595 microseconds per iteration Xoins : 213 microseconds per iteration Creation and destruction... Snit : 576 microseconds per iteration Xoins : 195 microseconds per iteration Method call (not delegated) Snit : 18 microseconds per iteration Xoins : 16 microseconds per iteration Method call (delegated) Snit : 7 microseconds per iteration Xoins : 14 microseconds per iteration Option setting Snit : 17 microseconds per iteration Xoins : 7 microseconds per iteration Option setting (delegated) Snit : 58 microseconds per iteration Xoins : 32 microseconds per iteration Option getting Snit : 7 microseconds per iteration Xoins : 4 microseconds per iteration Option getting (delegated) Snit : 15 microseconds per iteration Xoins : 15 microseconds per iteration
The following Snidgets work fine with Xoins:
See also itins, Snit, and of course XOTcl.