Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 8 May 2013 10:33:51 +0200
From: magnum <>
Subject: Re: Avoid calling no-op function

On 8 May, 2013, at 10:17 , magnum <> wrote:
> Solar,
> This gains 4% in a simple test:

I shouldn't have written that figure as it obviously can't be that good :) I was merely wondering if it's worthwhile at all.

> +       if (format->methods.clear_keys != fmt_default_clear_keys)
>        format->methods.clear_keys();

> I was benchmarking LM format in core tree but it was only a quick empirical test (ran 5 times with and without this extra line). Do you think real-life use (of same thing in cracker.c of course) could be significant? I have no idea of absolute cost for a function call (btw this was OSX). Also, at first I had that test moved out of the loop using a file-scoped variable for avoiding de-reference each time but the gain was smaller then... I'm not sure but that maybe indicates my "results" are more from other random differences than from the actual avoidance of the no-op function call?

Some further test (in cracker.c) indicate a gain of 0.1%... that's 10 minutes a week.


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.