-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe use std::bitset instead of packed_t? #73
Comments
I think it might simplify the code a bit, however the coding complexity, IIRC, is more at the level of |
According to https://stackoverflow.com/questions/3134718/define-bitset-size-at-initialization there would be 2 ways to address that
|
I tagged it as "good first issue". It is not an easy task, but it doesn't require a full (or much) understanding of MOSES to tackle it. |
BTW, fairly off-topic, but: take a look at the brand new But I learned that I can |
Interesting. I don't understand why alignment would increase performance in the first place but I'm not very knowledgeable about the low level parts of a computer. Well, I had courses but that was always with toy architectures just to get a feel. |
The difference between adding two 64-bit ints, and adding 2x 32-bit ints is simply cutting the carry bit-line between bit 31 and bit 32. Thus all the architectures introduced "SSE" instructions circa mid 1990's onwards, that support many kinds of ops in 2x32 or 4x16 or 8x8 ints with just one instruction. This was a boon that allowed MP3's and youtube to flourish. But of course, for this to work, you have to be aligned on appropriate boundaries. There's even a trick where you can do if-statements without any branches at all: you use the sign-bit in one reg to route the result of an operation to one of two different regs. Really slick, since normally conditionals and branches fart out pipeline bubbles. Its possible that the default build flags on moses don't enable these insns. Hmm. They are often disabled, so that binaries built on a cpu with these insns will also run on a cpu without these insns... That's a good question, I don't know the answer. |
gives me:
which explains earlier commentary about |
and this:
so that optimization is disabled, as are pretty much all the others that I vaguelt recognize. |
I just recompiled moses with |
Ooops, no, it makes no difference to |
... took a deeper look. Effectively it makes no difference at all. |
The
packed_t
is used to pack bits together. However, it seems that perhapsstd::bitset
might do this better, and also offer more features, functions, etc. It might simplify the code!? and might? run faster?The text was updated successfully, but these errors were encountered: