|
Message-ID: <fa6b0301ec9c901b2ca18a15700d49ba@smtp.hushmail.com> Date: Sun, 24 Mar 2013 03:16:17 +0100 From: magnum <john.magnum@...hmail.com> To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com> Subject: inlining strzncpy - and others? Solar, I just replaced Dhiru's four identical instances of inlined _memmem() with a shared jtr_memmem() in misc.h (using a faster implementation while at it) and made it 'extern inlined' as per the portable model described in http://www.greenend.org.uk/rjk/tech/inline.html (i.e. with function source in misc.h instead of misc.c). Do you have any opinions or wisdom on such inlining? The exercise made me think we might want to do the same to strnzcpy() and perhaps some other tiny functions that may be used in performance-critical code. I tested this briefly with strnzpy. The john binary grews with about 20 KB. A benchmark of raw-sha0 (using strnzpy in set_key) shows a one percent boost. That's not a lot but with slight boosts also in the rule engine, cracking modes and other parts of John it will add up to more. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.