PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Computer Folklore

Where should the type information be 229


Herman Rubin

? buttembler has zero precedence.

Most (all, as far as I know) compilers check types and produce optimum code for basic arithmetic when it's compiled, *not* when it runs. Not sure I'd call that "optimizing" so much as "not particularly stupid".

Real world example?

so you want to write something like...

CASE (case1).166: do something; break (case2).333: do something else; break (case3).333: and again; break (case4).166: more stuff to do; break OR: do error routine ENDCASE

and have the compiler figure out the best way (and of course give an error code if your .nnn's didn't add up to approximately 1.000)

Sounds reasonable; personally I "worry" that predictive branching in hardware wastes alot of cycles for exactly that reason (if for instance the branch is 1:1000000 or something but the compiler doesn't know that)

and again I'm reasonably sure that even if you didn't use a CASE statement (say the letter 'c' is broken on the keyboard) a normal compiler will look at

IF X = 1 THEN DO something ELSE IF X = 2 THEN DO something else ELSE IF X = 3 THEN DO and again ELSE IF X = 4 THEN DO more stuff ELSE DO error routine.

and know enough to load X into a register for compares only the once (instead of once for each IF).

You must be using some cheapbutt compiler there.

Portable buttemblers, was Where should the type information be
Herman, Just a pbutting comment: Like compilers, buttemblers can also be made portable, as has been done in a number of specific situations. The usual approach is to have a powerful...

"thrashing" is the technical term.

All processors' specs include timing for each machine code. Many compilers have a "translate into buttembler" option so you can see exactly what your compiled code looks like to the machine.

rpl


List | Previous | Next

Portable buttemblers, was Where should the type information be

Alt Folklore Computers Newsgroups

Where should the type information be 228