Subject Re: [Firebird-Architect] Data Stream Encoding
Author Dmitry Yemanov
"Jim Starkey" <jas@...> wrote:
> Your alternative, striking similar to the PDP-11 instruction word,
> incidentally, requires masking, shifting, a fair bit of navigation to
> get to the specific case.

I wouldn't buy this as an argument. Masking or shifting require a single
cycle even on very old CPUs. Considering existance of other code in the
encode/decode routines, I bet we'll see no noticable difference between your
and Geoff's code.

> Orthogonality, however, leads to inefficient
> use of the code space. While there are obvious benefits in large blocks
> of integer literal and short string length code, dedicating the same to
> opaque strings, which are infrequent and rarely short, is a waste of
> code space.

I prefer design simplicity rather than absolute density. In other words, I'm
with Geoff.

Could you provide a real data example where your idea shows much more dense

> Thanks for your comments and ideas. I think developers can handle
> switch statements with large blocks of labels without that much
> difficulty, but you may be right.

Ugly and too complex code is often an indication of bad design ideas.