Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...

You addressed the speed issue (which is probably pretty insignificant, I think we both agree),

I've tested the swithing and usual versions of that procedure,
init_opcodes(), and init_opcodes_my() - 10000 iterations on P4 1.8GHz:

exw.exe 
 
9.531   11.766    9.015  -- switching time 
6.062    6.156    6.187  -- usual time 
 
ex.exe 
 
8.294    8.359    8.349  -- switching time 
6.092    6.371    6.096  -- usual time 

Usual one looks better - about 50% faster.
ex.exe tends to be faster on that task.

mattlewis said...

but not the issue of the translator or binder knowing which routines are routine_id targets, and the benefits of being able to do that.

I do not know your plans. If you want to optimise the translator or binder some way, that procedure doesn't seem to be a good place for experiments with switch - it is too actual code.
You can get my test program here:
http://www.private.peterlink.ru/kinz/test_switch.zip

kinz

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu