'write-buffer' speed increase
Posted: Wed Oct 06, 2004 7:16 am
Fantastic!
This code show some speed, but then I changed my demo app with tower of Hanoi, where I have a timer for newlisp-execution time
I get a speed improvment from ca.940ms to 15ms. That's from waiting a second to immediately. Whow!
Excellent for script-generating!
Code: Select all
newLISP v.8.2.1 Copyright (c) 2004 Lutz Mueller. All rights reserved.
> (set 'str "")
""
> (time(dotimes (x 10000) (set 'str (string str "hello"))))
30614
> (set 'str "")
""
> (time(dotimes (x 10000) (set 'str (append str "hello"))))
301
> (set 'str "")
""
> (time(dotimes (x 10000) (write-buffer str "hello")))
10
>
> (set 'str "")
""
> (time(dotimes (x 10000) (write-buffer str (string "hello"))))
60
> (set 'str "")
""
> (time(dotimes (x 10000) (write-buffer str (string "hello" "test1"))))
90
>
>
I get a speed improvment from ca.940ms to 15ms. That's from waiting a second to immediately. Whow!
Excellent for script-generating!