[Mono-dev] SHA256 - small perf boost

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Apr 30 16:50:48 EDT 2008


Hey,

On Wed, 2008-04-30 at 22:12 +0200, Alan McGovern wrote:
> Change in plan, how does a speedup of 70% sound?
> 
> Strangely enough, mono wasn't inlining the static helper methods. As
> each of those helpers was only being called once, i inlined them
> manually and performance went through the roof. It may be worth
> grabbing a JIT guy and figuring out why mono is deciding that the
> methods shouldn't be inlined when in this case the benefits are
> definately clear.

Looks great. I too wonder why they are not inlined (or if they were at
one time).

You may want to check SHA384/512 which are near identical (between them)
and looks a lot like SHA256. SHA256 design is also shared with SHA224
which you'll find inside Mono.Security.dll (since MS never added it to
the framework, despite *me* asking ;-)

Thanks
Sebastien

> Alan.
> 
> On Wed, Apr 30, 2008 at 2:00 PM, Sebastien Pouliot
> <sebastien.pouliot at gmail.com> wrote:
>         yes, go ahead.
>         
>         thanks again
>         Sebastien
>         
>         
>         On Wed, 2008-04-30 at 02:30 +0100, Alan McGovern wrote:
>         > Applying some of the ideas from the SHA1 patch to sha256
>         left me with
>         > a 15% performance boost. Is this good to commit? It passes
>         the nunit
>         > tests.
>         >
>         > Alan.
>         
>         > _______________________________________________
>         > Mono-devel-list mailing list
>         > Mono-devel-list at lists.ximian.com
>         > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>         
> 



More information about the Mono-devel-list mailing list