Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Integer Comparison

Name: Anonymous 2009-09-10 19:50

Forgive if this is a stupid question:
Lately I have been testing basic arithmetic and logical operations by implementing them using only bitwise operators to test efficiency. Many simple operations can be sped up greatly using this approach.
The question is: will comparison of integers using only bitwise operators (no < or > or <= or >=) create any improvement? I would test this myself but for the life of me have not figured out how to implement this.

Name: Anonymous 2009-09-10 19:53

OP's note: If you can avoid providing the actual implementation that would be great. I just want to know if it's all in vain or not.

Name: Anonymous 2009-09-10 19:54

I'm not an expert on the matter and I'm not entirely sure how you would compare using only bitwise operators, but I think it depends on the architecture/chip-set.

Name: Anonymous 2009-09-10 19:56

no.
maybe 20 years ago, but i'm pretty sure it doesn't make even the slightest difference anymore

Name: Anonymous 2009-09-10 19:58

Okay. Thanks, guys. I am going to try to hammer out an implementation anyway and see what I find. But I think the idea that it doesn't matter anymore is probably correct.

Thanks again.

Name: Anonymous 2009-09-10 20:03

>>5
Yeah, good fucking luck with that

Name: Anonymous 2009-09-10 20:07

>>1
Wow, you have no idea how computers work.

Name: Anonymous 2009-09-10 21:22

>>1-7
SPAWHBTC

Name: Anonymous 2011-02-03 0:08

Don't change these.
Name: Email:
Entire Thread Thread List