Re: Guile's time execution issues

2020-05-04 Thread Ludovic Courtès
Hey! Aleix Conchillo Flaqué skribis: > So weird I'm getting different numbers on 2.2.7. Not sure how I'm getting > those initial ~20s and you are getting consistent ~ 45s. It > shouldn't have nothing to do with it, but could it be I'm running it on macOS? Did you add this ‘->bool’ call to ensu

Re: Guile's time execution issues

2020-05-04 Thread Linus Björnstam
On Mon, 4 May 2020, at 11:36, Ludovic Courtès wrote: > > One thing I found is that `match` is slow. The code looked nicer but had to > > change it back to lets and conds as the performance > > increase was ~2 seconds. > > Oh, in which case exactly? And are you sure your hand-written code is

Re: Guile's time execution issues

2020-05-04 Thread Linus Björnstam
Sorry, sent a premature reply. The problem is that some of those match blocks expand to using equal? which is a lot slower than using eqv? If we are doing it on every char in a 24mb file we are getting some serious constant factors. match is a syntax-rules macro, so distinguishing literals are

Re: Guile's time execution issues

2020-05-04 Thread Ludovic Courtès
Hi, Linus Björnstam skribis: > On Mon, 4 May 2020, at 11:36, Ludovic Courtès wrote: > >> > One thing I found is that `match` is slow. The code looked nicer but had >> > to change it back to lets and conds as the performance >> > increase was ~2 seconds. >> >> Oh, in which case exactly? And

Re: Guile's time execution issues

2020-05-04 Thread Linus Björnstam
You didn't see my other reply. The matching code isn't suboptimal. The equality predicate is The problem is that match compares using equal? even for literal chars (where eqv? is a lot faster). It would be a rather trivial optimization to do, either to match.scm (meaning: breaking with upstream