By: Linus Torvalds (torvalds.delete@this.linux-foundation.org), April 9, 2013 12:31 pm
Room: Moderated Discussions
EduardoS (no.delete@this.spam.com) on April 9, 2013 12:20 pm wrote:
>
> int magicNumber = 0;
Exactly. And then you generate that magic number for each machine you have. Possibly at startup. Except now you needed to make the prefetch offset a variable, so you made code generation even worse, and you've added extra instructions and register pressure just to keep track of what the offset should be.
So now you've done all this crazy infrastructure, and it turns out that on some machines the fastest time is with no sw prefetching at all, but you can't even measure that because your binary was compiled with that prefetching code in it.
So now you recompile the binary multiple ways for each machine? Moronic, I tell you.
It's f*cking insane. Software prefetching is not worth the pain. Don't do it. You're only fooling yourself.
Linus
>
> int magicNumber = 0;
Exactly. And then you generate that magic number for each machine you have. Possibly at startup. Except now you needed to make the prefetch offset a variable, so you made code generation even worse, and you've added extra instructions and register pressure just to keep track of what the offset should be.
So now you've done all this crazy infrastructure, and it turns out that on some machines the fastest time is with no sw prefetching at all, but you can't even measure that because your binary was compiled with that prefetching code in it.
So now you recompile the binary multiple ways for each machine? Moronic, I tell you.
It's f*cking insane. Software prefetching is not worth the pain. Don't do it. You're only fooling yourself.
Linus