ARX/BRX benchmark testing
hi, i did some tests with Mr Moses his benchmark files for LISP. Fabulous to see how BCAD beats ACAD on many (even most) functions. You don't have to try this on exotic ICAD variants... Apparently even "deutsche grundlichkeit" seems to crash ! Bricscad beats them all.
I have been porting ARX projects to BRX for some days now and it seems entity creation is lagging a bit compared to ACAD. But then again it handles +100.000 objects still pretty well.
Did anyone do ARX benchmark testing ?
Comments
-
I have not done any, but it sounds like fun. Drop by the ARX area at TheSwamp.org sometime for a race or two : )
0 -
Hi, Dirk, many thanks for the nice words :-)
Indeed, there are still some performance problems inside Bricscad - especially entity creation, at least when using sds_entmake() ... i.e. for block inserts, attributes and some more, and some problems with graphics performance; but all those topics are on high priority.
On the other side, we are indeed quite happy with the fast Lisp engine - this can compensate some performance lacks.
Just a question : did you encounter a crash with the Lisp benchmark ? If so, please tell me ... I'm not sure whether I understood you correctly.
Here are some early hints about the next Lisp engine generation - which I hope to integrate in January/February :
- loading Lisp files is 30%...40% faster
- general performance improvements by ~5%
- a Lisp profiler is included then with graphical and textfile reports, and comprehensive analysis
- a new VLE function set will be built-in : functions like (vle-remove-last <list>)
this is in first sight, a comfort library to make Lisp programmer's live easier;
but it is also a performance library :
the usual code to remove the last item from a Lisp list is
(setq myList (reverse (cdr (reverse myList))))
this can be done now by
(setq myList (vle-remove-last myList))
=> the performance gain is about factor 50 !!!
currently, that VLE function set has ~20 functions - but will be increased
the most important point is, that all (vle-xxx) functions are also available for Acad AutoLISP then -
with a freeware VLE-Library.lsp which can be loaded in Acad then, and this contains emulations
=> so no compatibility problem for Lisp developers :-)Another project in development is a so-called "Lisp-Optimiser" :
(vle-optimise 'defunName [dumpFile])
can create a performance-optimised code version, optionally stored as 'dumpFile' ...
so developers can replace their original code with the optimised version ...
naturally, the "optimiser" is based on the VLE library ...But the most exciting point is, that Lisp loader will automatically optimise each DEFUN during load-time
(can be disabled, if not wanted) ... thus, the loaded code in-memory uses VLE function set ...
Depending on the code, this can improve Lisp performance by 20% up to x00% - no limits here.Btw. my unpublished latest Lisp benchmark even benches those VLE functions, comparing with usual
standard code (like in Acad) ... results are really phantastic :-)Of course, I will provide a good documentation for the Profiler/Optimiser and the VLE library ...
0 -
The LISP benchmark test crashed (on memory i guess) on Ares engine and ZwCAD... (just using standard functions).
About the ARX benchmark testing. I have a function that creates colored elevation maps. Lots of entities ! Indeed i was still using ads_entmake (how did you know... ). But i ported this to ARX now and speed only improved about 10% in BRX, however in ACAD it is 3 times faster now, really strange.
I'm looking forward to your improvements.
0 -
Sorry i was wrong. I guess i took the wrong build. I did a test again based on 150.000 entities. The improvement is also in BCAD but also about the same as in ACAD. But the ARX function works 3 times faster in ACAD then in BCAD. I trying to find out now if this is in entity creation fase or something else.
The thing i like the most is that i just can use the same MSVC projects for both ACAD and BCAD.
0 -
hello again,
it is definitly the entity creation fase and as i said using old ads entmake or BRX doesn't seem to make much difference.
0 -
I would be interested in seeing your code, how does something like this compare to what you're doing?
static void Brx_TT1(void){ int cnt; LARGE_INTEGER freq,start,end; acedGetInt( _T("\nEnter Count (X1000): "), &cnt ); //start timer QueryPerformanceFrequency(&freq); QueryPerformanceCounter(&start); AcDbDatabase *pDatabase = acdbHostApplicationServices()->workingDatabase(); AcDbBlockTableRecordPointer pBlockTableRecord( pDatabase->currentSpaceId(),AcDb::kForWrite); for(int i=0 ; i<cnt ; i++){ for(int j=0 ; j<1000 ; j++){ AcDbPoint *pPoint = new AcDbPoint( AcGePoint3d(i,j,0) ); if(pBlockTableRecord->appendAcDbEntity(pPoint) != eOk) delete pPoint; else pPoint->close();}} //end Timer QueryPerformanceCounter( &end ); acutPrintf(_T("\n%g"),(double)(end.QuadPart-start.QuadPart)/freq.QuadPart );}
0 -
Dear Dirk, many thanks for your reply ...
I'm indeed satisfied that the crash is not with Bcad :-) The crash on ZWCAD and others are probably caused by memory allocations - as my Lisp bench sometimes creates very large lists, and those other Lisp engines are based on IntelliCAD lisp, which is extremely slow here ...
Regarding ads_entmake vs. ARX style - yes, the performance improvement by ARX/BRX style is significant ... but also, Bricscad is somewhat slower here;
the main reason as I know : adding entities to the drawing database is around 2...4 times slower than in Acad - this is probably what you also encounter :-(There is probably no easy solution - because ODA CAD engine uses arrays to store entities, while Acad does not use (they seem to use double-linked lists);
I guess this causes the main performance difference.But however, we also care for these problems, and working on performance improvements is one the major topics ... so improvements can be expected.
Another point why creating entities is slower - the display update in Acad is more advanced ... Bricscad does such updates more often, especially, when application code is running; I have noticed this when running heavy Lisp code in Acad : the display is updated "block-wise", not contiguous as in Bcad; this also costs somewhat performance;
but display update performance is also a major point for Bricsys team :-)I hope this helps a bit - at least, to understand ... many greetings, also to Daniel :-)
0 -
Thx for your reply.
I understand, also the tests i did are rather extreme, even then it executed them correctly, maybe a bit slower but it didn't crash. For most tasks BCAD does the job very well.
0