Re: Experiences about speed in tcl and STk.
> Johann Friedrich Heinrichmeyer writes
>
> I was a little disappointed by the speed of my port of my schematic
> editor interface for spice (not faster than the tcl version). I
> experienced that regexp-replace seems to be very slow. Maybe "case" and
> "do" should be compiled ...? The loading of a schematic file increased
> in speed very much when i used a more "scheme like" input format and
> therefore only the "read .." command. When i read in the old tcl format
> using regexp heavily the program slows down.
>
Are you sure that you do not compile several time the same regular expression?
Regexp compiling is very time consuming. In STk, compilation is done with
the string->regexp primitive. For instance,
(do ((i 0 (+ i 1)))
((= i 10000))
((string->regexp "a*b*c*d") "XXXXXX ad YYYYY")))
takes 3266.67ms on a sparc10 whereas
(define pattern (string->regexp "a*b*c*d"))
(do ((i 0 (+ i 1)))
((= i 10000))
(pattern "XXXXXX ad YYYYY")))
where the regexp is compiled only once takes 1850.00ms.
> Here three questions.
>
> 1. SCM and STk seem to have the same parents?
Yes, they share a SIOD origin.
> 2. How difficult is it to put speedups from SCM to STk ( case and do
> construct are compiled in SCM)?
This not too difficult (but not too simple too, this explain why it is not
already done. However, I hope to integrate them soon.
> 3. Has someone already tried to bring scm compilers and STk together?
> I think of meroon, hobbit .... . I dont want to compile everything
> but it would be nice to transform selected and proven procedures
> more or less in dlls ("remove-if" from lisp or similar things).
Hobbit could be probably ported for generating STk code. But as far as I know,
nobody has started such a job.
-- Erick
Received on Fri Mar 10 1995 - 17:18:54 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST