Re: [dev] dwm bit fields conversion

2013-07-15 Thread pancake
I should check generated code, but usually a mov is faster than mov+and+mov for setting a bit. On Jul 14, 2013, at 23:22, Markus Teich markus.te...@stusta.mhn.de wrote: Since this is just uncommon syntax (at least I haven't seen it before) and it is just used in the declaration I would be ok

Re: [dev] dwm bit fields conversion

2013-07-15 Thread Roberto E. Vargas Caballero
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

Re: [dev] [sbase] Patch to make md5 and sha1 more similar

2013-07-15 Thread sin
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 moving the

Re: [dev] [sbase] Patch to make md5 and sha1 more similar

2013-07-15 Thread Andreas Krennmair
* sin s...@2f30.org [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

Re: [dev] [sbase] Patch to make md5 and sha1 more similar

2013-07-15 Thread Jens Nyberg
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 a...@synflood.at * sin s...@2f30.org [2013-07-15 12:20]: I'd break this patch into multiple patches. The change from *= 8 to = 3

Re: [dev] [dwm] [patch] Fix warning about XKeycodeToKeysym

2013-07-15 Thread Alexander Rødseth
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

Re: [dev] [sbase] Patch to make md5 and sha1 more similar

2013-07-15 Thread Szabolcs Nagy
* Jens Nyberg jens.nyb...@gmail.com [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 x63 and x%64 x6 and x/64 x6 and x*64 are not the same when x might be negative (if x is negative then x63

Re: [dev] [sbase] Patch to make md5 and sha1 more similar

2013-07-15 Thread 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-optimization.pdf “Learn what the compiler does” – did anyone do that for pcc recently? I’m sure it does _not_ do all those