Can you please test this build with the same sources you did with the last one to see if there is the difference in speed?
Hi Habran,
Build speed for MasmBasic library is very good, only 10% slower now than AsmC :t
Would be nice to flush the console after each assembly, though.
Aren't the timings JJ provided run-time execution of the switch rather than compile-time related?
Here is run-time execution of the switch:
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
Assembled with AsmC
20 ms case 260, MB Switch_ table
193 ms case 260, MB Switch_ chain
374 ms case 260, Masm32 switch
5 ms case 260, AsmC .Switch
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
Assembled with HJWasm32
20 ms case 260, MB Switch_ table
190 ms case 260, MB Switch_ chain
374 ms case 260, Masm32 switch
48 ms case 260, HJWasm .SwitchAnd the size of the generated switch codes:
2989 bytes for MbTable
4840 bytes for MbChain
4799 bytes for Masm32
4201 bytes for asmc
5729 bytes for hjwasmThe AsmC .Switch is clearly fastest, while the MasmBasic Switch_ macro generates the smallest code for high case numbers (where it auto-selects the compact table version).