Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Improved bAND, bOR, bXOR
#4
britlion Wrote:I can't offhand see how this code could be optimised further, honestly. I'd be curious and intrigued to see what clever tricks could be pulled, though.
Well, I didn't explain clearly: because they are PART OF the language; the code is the same (bitwise operations will be straighforward). So the code is placed *inline*, so no function call, no push/pop sequence (whenever possible), and availability for all integer types. :!: (8, 16 and 32 bits). :wink:

There will be also a XOR logical operator, so this:
Code:
IF (a < b) AND NOT(b < c) OR NOT (a < b) AND (b < c) THEN
[...]
END IF
can be written as:
Code:
IF (a < b) XOR (b < c) THEN
[...]
END IF
which will be faster, shorter and take less memory.
So the language will be completely orthogonal.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)