On Sunday, 20 April 2014 at 13:08:02 UTC, bearophile wrote:
sorry, it uses GDC @attribute("forceinline") feature, so you
Have you performed a benchmark with and without that attribute?
not on this code yet. will check it someday,

In this kind of code computed gotos could help performance.
i don't think so: it's not a 'table-driven executor', it does proper instruction decoding by various opcode bitfields like Z80 do. this is "by design". so i can't just make a huge table for computed goto.

struct { ubyte c, b; };
Struct definitions in D don't end with the semicolon.
ah. tnx, this is a C code leftovers. maybe compiler should emit warnings on superfluous semicolons?

I suggest to omit the space between the function name and its arguments.
sorry, but i will not change my coding style. i may use original author's style when sending patches, but i'm used to my own for my projects.

And if you want you can also add an "in":
tnx, will do.

And perhaps it's better to use enum values instead of magic constants.
this is hardware magic by itself. %-) i don't think that constants like 'BIT7MASK' and 'BITS0TO6MASK' will look prettier here.

static __gshared ubyte parity_tbl[256];
Better to use the D syntax:
static __gshared ubyte[256] parity_tbl;
ah, C leftovers again, changed, tnx.

thanks for all your comments and suggestions. i'm still D newbie, so they are valuable input.

Reply via email to