Devin Mullins
6/17/2005 12:11:00 PM
Remembering, vaguely, my comp arch class, I'm pretty sure the co-worker
(or cow-worker, if you really don't like him) was talking not about
threading, but about how some VLIW (very long instruction word, i.e. not
32-bit) machines include a 'predicate' in addition to the instruction
(i.e. MOV FOO, BAR IF EQL ALREADY_RUN, 0 is one instruction). I presume,
then, you guys are not running on x86.
And no, Ruby's too high level, and yeah, not compiled.
And wouldn't it be faster still just to pull foo = bar out of the while
loop? :)
Devin
Robert Klemme wrote:
>Phil Tomson wrote:
>
>
>>I'll take a stab at this, but I'm no expert....
>>
>>Your cow-worker _may_ be right about the differences between the two
>>code snippets. I would think that you'd have to know what kind of
>>assembly code got generated by the two different snippets, though.
>>Perhaps he's taken a look at the compiled code. It also seems like
>>it could differ a lot between compilers (g++ vs. VC++).
>>
>>As far as Ruby code goes, I don't think you would see any difference
>>because Ruby doesn't get compiled to native code (yet ;-). Though
>>there may be differences in how the interpretter handles the two
>>different snippets which could possibly effect speed, it would have
>>nothing to do with anything deep down in the actual hardware
>>processor.
>>
>>
>
>.... especially as Ruby does no parallelism internally (no native threads).
>
>My 0.02EUR...
>
> robert
>
>