Re: [tcljava-dev] Performance results for new TJC compiler
Brought to you by:
mdejong
From: Mo D. <md...@un...> - 2006-03-02 08:50:18
|
Hello I decided to try to get some "real world" numbers related to the TJC compiler. What I did was to test how long the TJC compiler took to compile itself and then compared that with how long a TJC compiled version of itself took to compile itself. Just to make things even more interesting, I compared those times to the amount of time it took to execute the TJC compiler in the C version of Tcl which has an embedded compiler and byte code engine. Here are the results. C Tcl (Tcl byte code compiler) $ time tjc -nocompile tjc.tjc real 5m30s (330 s) Interpreted in Jacl (no compilation) $ time tjc -nocompile tjc.tjc real 21m17s (1277 s) TJC compiled in Jacl: $ time tjc -nocompile tjc.tjc real 2m42s (162 s) These results show that compiling with TJC lead to code that executed 7.8 times faster. That is quite an improvement. The TJC compiled Jacl version of this code even executes about twice as fast as the same code running in the C version of Tcl. cheers Mo DeJong P.S. I added support to the Makefile for a 2 stage build rule that will recompile the TJC source with TJC. Just build the normal way and then run "make install". After that, run "make tjc2 tjc2.replace tjc.install" to 2 stage the compiler and install the compiled versions of tjc.jar and tjcsrc.jar. The numbers above show that this 2 stage will take about 20 minutes to run the first time, but the compiler will then execute about 8 times faster. |