[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Semaphore assembly-code bug

On Fri, 29 Oct 2004, linux-os wrote:
> Linus, there is no way in hell that you are going to move
> a value from memory into a register (pop ecx) faster than
> you are going to do anything to the stack-pointer or
> any other register.

Sorry, but you're wrong.

Learn about modern CPU's some day, and realize that cached accesses are
fast, and pipeline stalls are relatively much more expensive.

Now, if it was uncached, you'd have a point.

Also think about why

call xxx
jmp yy

is often much faster than

push $yy
jmp xxx

and other small interesting facts about how CPU's actually work these

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.615 / U:1.104 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site