chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Improve irregex matching performance a lot


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Improve irregex matching performance a lot by adding two type declarations
Date: Wed, 9 Dec 2015 08:57:01 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 09, 2015 at 01:30:47AM +0100, Kooda wrote:
> On Tue, Dec 08, 2015 at 10:12:46PM +0100, Peter Bex wrote:
> > Using the unpatched version:
> > 1.336s CPU time, 0.028s GC time (major), 600061/2562 mutations 
> > (total/tracked), 11/2823 GCs (major/minor)
> > 
> > Using the patched version:
> > 0.828s CPU time, 0.036s GC time (major), 600061/2562 mutations 
> > (total/tracked), 11/2823 GCs (major/minor)
> 
> Nice! Well done! :D

Thanks :)

> > Now, if you look at the patch you'll see that it changes irregex-core.scm,
> > which means it creates a "fork" against that part of the code in upstream.
> > I don't see a way to declare the type from the "outside", in irregex.scm,
> > unless we also copy that code body as a macro, but that feels really ugly
> > and will cause some code duplication in the resulting C code.
> 
> Wouldn’t declaring the type of the procedure in irregex.scm do the same
> as what you did, since your patch only hints about the arguments of the
> procedure?

I tried that, but it didn't work.  I suppose that's because a type
declaration for a procedure only affects its callers, not the procedure
itself.

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]