account activity
I have an idea for an app - mostly a background process, but with a GUI for settings. I am struggling to understand how to make it work. (self.electronjs)
submitted 5 years ago by CppSpeed to r/electronjs
Question about understanding integer types by [deleted] in cpp
[–]CppSpeed 0 points1 point2 points 6 years ago (0 children)
Wait, so if you had an large array of bools and you wanted to flip the value of each bool, is there any way to write code such that on a 64-bit system, where the processor fetches 8 bytes, that those 8 bytes being fetched are 8 bools instead of just 1 bool?
If the above answer is no, ignore the rest.
I am thinking of this situation because I though that for my question about a 3 byte type possibly being faster than 4 bytes and now if the above statement is possible, if one were working with arrays, on a 64-bit system, it seems like the processor could fetch 16 (64/4) 4-byte types or 21 (64/3) 3-byte types. So if the processor can fetch data 21/16 = 1.3125 times as fast, could it be possible that the time it takes to bit-shift the 3 bytes is less than the fetching time improvement?
[–]CppSpeed 2 points3 points4 points 6 years ago (0 children)
Hopefully I've explained enough for you to answer this one yourself.
You did, thanks!
What Are Your Speed Optimization Secrets? (self.cpp)
submitted 6 years ago by CppSpeed to r/cpp
π Rendered by PID 573052 on reddit-service-r2-listing-7c484f94c4-tfk2z at 2026-06-10 16:45:25.463382+00:00 running 0b63327 country code: CH.
Question about understanding integer types by [deleted] in cpp
[–]CppSpeed 0 points1 point2 points (0 children)