From owner-freebsd-hackers Mon Jan 6 16:55:57 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id QAA16776 for hackers-outgoing; Mon, 6 Jan 1997 16:55:57 -0800 (PST) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id QAA16771 for ; Mon, 6 Jan 1997 16:55:55 -0800 (PST) Received: from time.cdrom.com (localhost [127.0.0.1]) by time.cdrom.com (8.8.4/8.6.9) with ESMTP id QAA02141; Mon, 6 Jan 1997 16:55:04 -0800 (PST) To: Ade Barkah cc: mrcpu@cdsnet.net (Jaye Mathisen), msmith@atrad.adelaide.edu.au, hackers@freebsd.org Subject: Re: pib comments. In-reply-to: Your message of "Mon, 06 Jan 1997 16:26:46 MST." <199701062326.QAA19442@hemi.com> Date: Mon, 06 Jan 1997 16:55:04 -0800 Message-ID: <2136.852598504@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > [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