[split] BFI_INT from OpenCL
#7
It seems that bitselect() does not offer any benefit over using (a&b)|(~a&c). None at all. Not that I hoped that the compiler will somehow generate magically better IL code using some magic instructions, but I was thinking that there could be some wise trick they do. I thought that bitselect() is there for some reason.

Decided to make a simple test. Basically the round function in MD5 (round1 and 2) is:

1) (b & c) | ((~b) & d)

which can be directly replaced with

2) bitselect(b,d,c)

and the third option is to rewrite it as:

3) d ^ (b & (c ^ d))


1) and 2) give the same speed and 3) is a bit faster, but the difference is negligible.

Argh Sad


Guess what...
Reply


Messages In This Thread
[split] BFI_INT from OpenCL - by gat3way - 12-15-2010, 12:21 AM
RE: [split] BFI_INT from OpenCL - by gat3way - 12-17-2010, 10:02 AM
RE: [split] BFI_INT from OpenCL - by Dalibor - 12-17-2010, 03:17 PM
RE: AMD Stream 2.3 SDK released - by atom - 12-15-2010, 09:09 AM
RE: AMD Stream 2.3 SDK released - by IvanG - 12-15-2010, 05:48 PM
RE: AMD Stream 2.3 SDK released - by atom - 12-15-2010, 07:33 PM
RE: AMD Stream 2.3 SDK released - by IvanG - 12-15-2010, 08:24 PM
RE: AMD Stream 2.3 SDK released - by atom - 12-15-2010, 09:22 PM
RE: AMD Stream 2.3 SDK released - by gat3way - 12-15-2010, 11:06 PM
RE: AMD Stream 2.3 SDK released - by Dalibor - 12-16-2010, 04:21 PM