Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jan 1997 16:55:04 -0800
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Ade Barkah <mbarkah@hemi.com>
Cc:        mrcpu@cdsnet.net (Jaye Mathisen), msmith@atrad.adelaide.edu.au, hackers@freebsd.org
Subject:   Re: pib comments. 
Message-ID:  <2136.852598504@time.cdrom.com>
In-Reply-To: Your message of "Mon, 06 Jan 1997 16:26:46 MST." <199701062326.QAA19442@hemi.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> [1000 iterations of factorial(20)]
> ...
> [Fibonacci function, useful for measuring interpretive languages]
> 
> Anyway, pretty interesting numbers; they're not conclusive, of
> course, but imho one gets a feel for TCL's relative speed.

Well, "sort of."

The problem with both these benchmarks is that they're repetitive
numerical calculations, something which TCL is not only most
definitely not-good at, it's something it wasn't even *designed* to
do.  The expression handling in TCL is all done in string form, with
conversion to and from integers or floats happening as needed by
`expr'.  This is a hideously slow process, and one is expected to use
it only infrequently to calculate intermediate results or window sizes
and such.  TCL is, as you said in your first paragraph, a scripting
language for extending or customizing application behavior.  If people
are using it to calculate factorials, they're using it for the wrong
things, and for these tests to have been truly fair (to "the TCL way")
they should have just shown the C numbers for TCL with a little tossed
in for function call overhead (say +.01 for TCL) since any
right-minded TCL programmer would have taken the C versions of the
Factorial or Fibonacci series calculations and stuck a TCL wrapper
around them before they would have even *considered* what Tom and
Jean-Jacques have done here. :-)

					Jordan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2136.852598504>