Are there alternatives to bit-wise operators?

Asked by Lee Bieber

Are there alternatives to the removed bit-wise operators, |, &, << and >>?

Question information

Language:
English Edit question
Status:
Answered
For:
Drizzle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) said :
#1

Found this buried on our wiki page so am posting here.

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#2

No, this thread gives an explanation as to why it was removed:

http://<email address hidden>/msg00359.html

Revision history for this message
Brian Aker (brianaker) said :
#3

Having functions, and eventually a dynamic bit type wouldn't be that difficult. The functions are no more then a couple of hours worth of time.

Revision history for this message
André R. (andre-romcke) said :
#4

Hi, this is how we use bit operations and hence why we would like to see it included somehow:

Languages uses bit mask for our content model, so on 32 bit systems we allow up to 30 languages, and on 64 bit with some patching 60 languages.
This is enough for our use, and I guess the reasons for not creating separate tables for this info instead with one to many relationship is that have a huge amount of tables already and the guys implementing it though bit operations would be faster (but is it? Think i've seen mysql having some index usage problems on bit fields, not sure though).

Revision history for this message
André R. (andre-romcke) said :
#5

index usage problems on bit fields => index usage problems when using bit operations

Can you help with this problem?

Provide an answer of your own, or ask Lee Bieber for more information if necessary.

To post a message you must log in.