|
|
Message-ID: <a4cb42a7ea1dfc92330261cd9db43b6a@smtp.hushmail.com>
Date: Sat, 18 Apr 2015 03:00:25 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Format interface changes
On 2015-04-18 01:30, magnum wrote:
> We could try using it for a few helper functions though, like strzcpy()
> and strlen8().
On second thought, those two examples wont benefit at all from restrict
pointers anyway. I think it's mostly for functions involving many
pointers, like the wikipedia example:
void updatePtrs(size_t *ptrA, size_t *ptrB, size_t *val)
{
*ptrA += *val;
*ptrB += *val;
}
Here, assuming any or all of the pointers can be aliased, *val has to be
reloaded from memory between the two operations. That's not needed if
all three pointers are declared as restrict. I can't think of any
central "tiny change, huge gain" places in JtR where this would apply.
Things like RC4 might be candidates though.
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.