xoins

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/
 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.

MS notes that snit2 got much faster at dispatch since Tcl8.5a6 (bytecompiling [namespace upvar]). Any newer benchmarks?

Sarnold updated on 2006-10-09 Here are benchmarks with Tcl 8.4:

   Snit 1.1 vs Xoins (XOTcl 1.4.0 & Tcl 8.4.13)
 Creation and destruction...(using %AUTO%)
  Snit : 896.06 microseconds per iteration
  Xoins : 171.11 microseconds per iteration
 Creation and destruction...
  Snit : 889.28 microseconds per iteration
  Xoins : 159.28 microseconds per iteration
 Method call (not delegated)
  Snit : 21.44 microseconds per iteration
  Xoins : 13.047 microseconds per iteration
 Method call (delegated)
  Snit : 18.475 microseconds per iteration
  Xoins : 13.525 microseconds per iteration
 Option setting
  Snit : 21.703 microseconds per iteration
  Xoins : 8.08 microseconds per iteration
 Option setting (delegated)
  Snit : 70.701 microseconds per iteration
  Xoins : 34.774 microseconds per iteration
 Option getting
  Snit : 12.728 microseconds per iteration
  Xoins : 5.123 microseconds per iteration
 Option getting (delegated)
  Snit : 26.567 microseconds per iteration
  Xoins : 15.748 microseconds per iteration

With Tcl 8.5a2 and Snit 2:

   Snit 2.0 vs Xoins (XOTcl 1.4.0 & Tcl 8.5a2)
 Creation and destruction...(using %AUTO%)
  Snit : 594 microseconds per iteration
  Xoins : 229 microseconds per iteration
 Creation and destruction...
  Snit : 580 microseconds per iteration
  Xoins : 200 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 : 8 microseconds per iteration
 Option setting (delegated)
  Snit : 58 microseconds per iteration
  Xoins : 32 microseconds per iteration
 Option getting
  Snit : 6 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.


Category Object Orientation