Bitwise operators

Dscript

Learned-to-turn-off-magboots endo
Joined
Apr 5, 2021
Messages
49
#1
Yolol could SERIOUSLY benefit from bitwise operators

Just &(and) and |(or) would be an amazing help

I realize the numerical values are not simple integers

Yolol requires using low level tricks to perform complex operations.. bitwise operators would be a great help

I'm not sure how you guys are storing the numerical values.. doubles perhaps.. but maybe just do some forced casting to reduce numbers to ints when a bitwise operater is used

Eg

x=y&z
Becomes
x=(int)((int) y) & ((int) z)

This would also allow us to use x OR zero to round off numbers
 

XenoCow

Master endo
Joined
Dec 10, 2019
Messages
588
#3
I like the idea of being able to store information in what's essentially a bool array, then use bit masks to parse out the desired element.
 

Dscript

Learned-to-turn-off-magboots endo
Joined
Apr 5, 2021
Messages
49
#4
I like the idea of being able to store information in what's essentially a bool array, then use bit masks to parse out the desired element.
That's the main idea :)

Using modulus is not as efficient as bit masking

Bit shifting can be done with division. So that's already covered
 
Last edited:
Top