TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: gskelly on April 02, 2009, 11:08:45 PM
-
I was quite surprised by how different the runtime is to transpose a list of lists :-o
Guess I am starting to understand why you folks discuss and compare methods so much.
Results:
: (load "transpose_with_func")
C:DOIT
: doit
==============================================================
Testing transpose with vlax-variant-value: many cols few rows
Elapsed milliseconds / relative speed for 1024 iteration(s):
(TRANS3 DATA)......1124 / 18.1 <fastest>
(TRANS1 DATA).....17593 / 1.16
(TRANS2 DATA).....20342 / 1 <slowest>
==============================================================
Testing transpose with vlax-variant-value: many rows few cols
Elapsed milliseconds / relative speed for 1024 iteration(s):
(TRANS3 DATA).....1312 / 1.37 <fastest>
(TRANS2 DATA).....1750 / 1.03
(TRANS1 DATA).....1796 / 1 <slowest>
Using code in the attached file.
PS: This came about because I got a friend to test a routine on Autocad and it did not perform very well. I've since noticed this test runs almost an order of magnitude slower on Autocad on a similar (but not identical) machine. Is there something I've done Autocad does not like or is there a more intelligent way to transform these variants to values?
Greg
-
Where is the files (load "Benchmark")?
-
Where is the files (load "Benchmark")?
Oops... sorry. You can find it in this topic: http://www.theswamp.org/index.php?topic=3952.msg47217#msg47217 (http://www.theswamp.org/index.php?topic=3952.msg47217#msg47217)
-
Too tired to look at this tonight but trans3 has an error.
(mapcar '(lambda(x) (mapcar 'vlax-variant-value x)) rsdata)
This does nothing with the variant value.
ZZZzzzz....
-
Too tired to look at this tonight but trans3 has an error.
(mapcar '(lambda(x) (mapcar 'vlax-variant-value x)) rsdata)
This does nothing with the variant value.
ZZZzzzz....
Thanks for that... Copied straight from the command window and did not set a variable!
I'll see if I can update the post above.
Edit: Ok, I updated the attachment above. Doesn't really change the timings, just the return value.
-
Are you doing comparisons between AutoCAD and Bricscad? Just wondering because I rand a few quick benchmark tests a while back, sending data between Arx/Brx and Lisp and to my surprise Bricscad was over twice as fast.
;AutoCAD 7.672 seconds
;Bricscad 2.186 seconds
(repeat 100000
(speedtest "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 1 1.0)
)
; AutoCAD 36.843
; Bricscad 9.422
(repeat 500000
(speedtest "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 1 1.0)
)
IMHO the reason is, Autolisp from Autodesk is in maintenance mode and the other is not
Sorry to hijack your thread :evil:
-
Are you doing comparisons between AutoCAD and Bricscad? Just wondering because I rand a few quick benchmark tests a while back, sending data between Arx/Brx and Lisp and to my surprise Bricscad was over twice as fast.
Dan, yes I am using Bricscad but I do not have Autocad therefore cannot do a direct comparison. The other machine with Autocad is "similar" (there are so many potential differences in OS and AV) so I would not call this a comparison. It seemed the timings for identical number of loops was sooo different I thought there might be something I am doing wrong...
On a different note: If I were to pack the data into a list and return it to Lisp similar to the demos you sent me would you expect that to be faster?
Greg
-
Using ACAD2000 8-)
==============================================================
Testing transpose with vlax-variant-value: many cols few rows
Elapsed milliseconds / relative speed for 64 iteration(s):====Benchmarking
.........
(TRANS3 DATA)......1292 / 22.76 <fastest>
(TRANS1 DATA).....28121 / 1.05
(TRANS2 DATA).....29402 / 1.00 <slowest>
==============================================================
Testing transpose with vlax-variant-value: many rows few cols
Elapsed milliseconds / relative speed for 64 iteration(s):====Benchmarking
.........
(TRANS1 DATA).....1512 / 1.27 <fastest>
(TRANS2 DATA).....1512 / 1.27
(TRANS3 DATA).....1922 / 1.00 <slowest>
-
Using ACAD2000 8-)
Thanks.