Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: this way last opcode costs more than the first Reply to this message
Posted byBart T.
Posted on12/17/03 09:46 PM




> opcode = readOpcodeFromMemory(PC);
>
> (functionArray[opcode]) (parameters);
>
> Downsides were the init time, which was kinda long, and the fact that all
> functions implementing opcodes shared the same signature, which was a useless
> parameter passing, sometimes. But no time wasted to "seek" the correct opcode
> implementation.

Switch statements can often be converted to jump tables by the compiler which produces slightly better code than indirect function calls.


----
Bart

-
Entire Thread
Subject  Posted byPosted On
*Playstation Emu  finaldave12/16/03 09:16 AM
.*this way last opcode costs more than the first  Terry Bogard12/17/03 07:40 PM
...Re: this way last opcode costs more than the first  Bart T.12/17/03 09:46 PM
.*Re: Playstation Emu  galibert12/16/03 09:37 PM
..*Re: Playstation Emu  finaldave12/18/03 04:59 AM
...*Re: Playstation Emu  tratax12/30/03 07:11 PM
..*Re: Playstation Emu  finaldave12/17/03 05:05 AM
...*Re: Playstation Emu  smf12/17/03 06:21 AM
....*Re: Playstation Emu  finaldave12/17/03 06:21 PM
.....*Re: Playstation Emu  Riff12/17/03 07:57 PM
......*Re: Playstation Emu  smf12/18/03 05:24 AM
.......*Re: Playstation Emu  tratax12/30/03 07:07 PM
........*Re: Playstation Emu  smf01/02/04 05:56 AM
........*Re: Playstation Emu  R. Belmont12/31/03 01:19 AM
.........*Re: Playstation Emu  tratax01/01/04 06:06 PM
.......*Re: Playstation Emu  ElSemi12/18/03 01:24 PM
........*Re: Playstation Emu  Riff12/18/03 04:56 PM
.*Re: Playstation Emu  Bart T.12/16/03 01:02 PM