BinaryByter
and bitshifts are very slow
Anonymous
BinaryByter
this is false
in the worst case*
Anonymous
Anonymous
bitshifts for arm are implemented inside the instruction
Anonymous
and are done as a zero instruction
BinaryByter
warum es gut ist, dass bools nicht als bitfields implementiert werden sieht man übrigens an diesem bildschirmfoto
BinaryByter
here
BinaryByter
enjoy your slow bitshifts :D
BinaryByter
why
it was just a benchmark
BinaryByter
because I had to convince someone that bools should NOT be implemented as single bits
@oleg
only issue is you forgot a ( after uint32_t
yes, code with errors) the question is what to choose..
BinaryByter
XD
;_;
Anonymous
intel is not made in a way to optimize things like bitshifts
BinaryByter
amd ryzen i1600
BinaryByter
g++
Ariana
so that is going to be around 4-8 instructions
rmb parallel computing exists, that also why xor swop isnt used
Anonymous
amd is still not optimized for that
Ariana
screw english :>
Dima
swop lol
BinaryByter
screw english :>
i've got a screwdriver
Dima
don’t touch my swamp
BinaryByter
don’t touch my swamp
i... rather not
Anonymous
which rmb are you talking about?
Ariana
._.
BinaryByter
"rotating mother board" can't unsee xD
Anonymous
OH
Anonymous
ok
Anonymous
i thought you meant the instructions
Ariana
oh
Anonymous
parallel computing does exist but not for embedded devices
Ariana
Yeah
Anonymous
well it does but that is a shitshow
Ariana
Normal computers would have
Anonymous
so HIGHLY suggest against that
Ariana
Abuse it as hard as possible :>
BinaryByter
i abuse tech on an every day basis
BinaryByter
*cough* webcpp
Ariana
Abuse it as hard as possible :>
oh and the out of order thingy too
Anonymous
another way to do it which is like the first way but in less code is this: return *((uint32_t*) (uint8_t* {data[1], data[0], data[2], data[3]}));
Anonymous
Ariana
oh yeah if the compiler decides to screw with local vars crippled
BinaryByter
cringe
wat? xD
BinaryByter
lets all agree that working with raw bits and bytes is crippled
Ariana
i need a cpp sage library for me to abuse cpp everyday
BinaryByter
no:)
then have fun writing unreadable code :D
Ariana
did you see my autism c code?
have you seen mine :)
Ariana
SHOW
my git XD
BinaryByter
Me
xD
Ariana
My code is literally so bad that when i do writeups i need to rewrite the whole thing
Anonymous
here is my code
BinaryByter
Ariana
mdr
Anonymous
i seen MUCH MUCH MUCH worse
Ariana
mdr
got to one up it
Anonymous
hell i even wrote worse
Ariana
Time to mix cryllic and ascii haha
BinaryByter
you are not ready to die
BinaryByter
... yet
Ariana
Oh wait google already did that
Anonymous
i am looking for your fucked up code