TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: d2010 on March 19, 2023, 01:35:27 AM
-
:idea:Hello.
We need the compare and calculate the speeds of Stack for recursive-functions?
<Must be in different platforms BrisCad, AutoCad, Cadian, ProgeCad
Who is the winner?
How we can calculate the speed of Stack with LISP sources?
The stack-of-call/s inside VLX is more slower than .LSP?
The stack-of-call/s inside FAS is more slower than .VLX?
:police:
-
I test most all of them in C++
this is iterating entities in model space
AutoCAD is the fastest, followed by ZwCad
Num Entities = 291876
ARX - DbTests::OpenAllForRead, Time = 0.031310
ARX - DbTests::OpenAllForRead, Time = 0.029678
ARX - DbTests::OpenAllForRead, Time = 0.029503
ARX - DbTests::OpenAllForRead, Time = 0.030294
BRX - DbTests::OpenAllForRead, Time = 0.084655
BRX - DbTests::OpenAllForRead, Time = 0.083957
BRX - DbTests::OpenAllForRead, Time = 0.090532
BRX - DbTests::OpenAllForRead, Time = 0.085526
GRX - DbTests::OpenAllForRead, Time = 0.045137
GRX - DbTests::OpenAllForRead, Time = 0.045998
GRX - DbTests::OpenAllForRead, Time = 0.045715
GRX - DbTests::OpenAllForRead, Time = 0.046274
ZRX - DbTests::OpenAllForRead, Time = 0.041592
ZRX - DbTests::OpenAllForRead, Time = 0.042775
ZRX - DbTests::OpenAllForRead, Time = 0.040999
ZRX - DbTests::OpenAllForRead, Time = 0.042115
Num Entities = 291876
ARX - DbTests::OpenAllForWriteXform, Time = 0.709899
ARX - DbTests::OpenAllForWriteXform, Time = 0.712916
ARX - DbTests::OpenAllForWriteXform, Time = 0.710051
ARX - DbTests::OpenAllForWriteXform, Time = 0.713089
BRX - DbTests::OpenAllForWriteXform, Time = 1.374065
BRX - DbTests::OpenAllForWriteXform, Time = 1.375848
BRX - DbTests::OpenAllForWriteXform, Time = 1.338291
BRX - DbTests::OpenAllForWriteXform, Time = 1.355196
GRX - DbTests::OpenAllForWriteXform, Time = 1.447262
GRX - DbTests::OpenAllForWriteXform, Time = 1.461199
GRX - DbTests::OpenAllForWriteXform, Time = 1.489696
GRX - DbTests::OpenAllForWriteXform, Time = 1.518017
ZRX - DbTests::OpenAllForWriteXform, Time = 0.845144
ZRX - DbTests::OpenAllForWriteXform, Time = 0.842838
ZRX - DbTests::OpenAllForWriteXform, Time = 0.856382
ZRX - DbTests::OpenAllForWriteXform, Time = 0.846967
-
To compare stack call speed across platforms like BricsCAD, AutoCAD, CADian and ProgeCAD, you need to create equivalent recursive functions on each platform and measure their execution time. This can be done by using the timer function to measure the time it takes to complete each function.
(defun test-speed ()
(setq start-time (get-internal-real-time))
; code to test speed goes here
(setq end-time (get-internal-real-time))
(princ (format "Elapsed time: %f seconds" (- end-time start-time))))
In this example, the test-speed function can be used to measure the time taken by the code that you want to test. The get-internal-real-time function returns the current internal real time in seconds and the format function is used to print the elapsed time in seconds.
As for your other questions, the speed of stack calls inside VLX or FAS files may depend on various factors such as the size of the file, the algorithm used, and the specific implementation of the programming language. It's difficult to say which one is faster without further information.
-
get-internal-real-time & format are not functions defined in the AutoLISP API.
-
Those are Common Lisp functions.
When asking ChatGPT ( or blind google searches ) the question is important, and some interpretation may be required :)
-
ChatGP will be a nightmare for a while yet. So much incorrect code. Makes up function names when it does not know how to do it other posts have exposed this problem on lots of forums.