I usually use bitfields when there are a lot of items (for example
st glyph could be a good case for them). In other cases you waste
more memory with the access code that the space you save compacting
the bits in the struct.
> I should check generated code, but usually a mov is faster than mov+a
On Mon, Jul 15, 2013 at 02:00:35AM +0200, Jens Nyberg wrote:
> Hi,
>
> I've included a patch that makes minor changes to md5 and sha1. Both
> hashing functions are pretty similar but the code differed in a few places
> so I cleaned them both up a bit.
>
> Also I made some minor changes like movin
* sin [2013-07-15 12:20]:
I'd break this patch into multiple patches. The change from *= 8 to <<= 3
doesn't make sense. Maybe it did in the 80s but not anymore.
Just for the sake of completeness: there's a rather interesting presentation
from a few years ago that explains in detail how clev
Hehe and I almost thought about changing to (x & 0x3f) instead of (x % 64)
but decided to skip that one =)
The more you know!
2013/7/15 Andreas Krennmair
> * sin [2013-07-15 12:20]:
>
> I'd break this patch into multiple patches. The change from *= 8 to <<= 3
>> doesn't make sense. Maybe i
Hi,
I read the git log after having submitted the patch and I understand
that this issue has been looked at and various solutions has been
considered already. Hopefully there will be a good way to resolve this
in the future.
Thanks for the feedback on the patch!
Best regards,
Alexander Rødseth
* Jens Nyberg [2013-07-15 16:51:29 +0200]:
> Hehe and I almost thought about changing to (x & 0x3f) instead of (x % 64)
> but decided to skip that one =)
>
note that
x&63 and x%64
x>>6 and x/64
x<<6 and x*64
are not the same when x might be negative
(if x is negative then x&63 depends on the si
Andreas Krennmair dixit:
> from a few years ago that explains in detail how clever compilers really are
> with their optimizations: http://www.fefe.de/source-code-optimization.pdf
“Learn what the compiler does” – did anyone do that for pcc recently?
I’m sure it does _not_ do all those uber-optimi
I changed the bitshifting back as suggested. It was just confusing.
Attached the new patch.
2013/7/15 Thorsten Glaser
> Andreas Krennmair dixit:
>
> > from a few years ago that explains in detail how clever compilers really
> are
> > with their optimizations:
> http://www.fefe.de/source-code-o