IRC channel logs


back to list of logs

<ArneBab>I transferred my wisp-project-site to my org-mode based page, and while doing that I added a link-list for projects using wisp:
<ArneBab>(the old link is redirected to the new one, so your links should keep working)
<ArneBab>I would like to extend the list, so if you played with Wisp and you’re not in the list yet, please drop me a note so I can link you!
<chrislck>Wednesday greetings
<wingo>"read" in scheme currently at 0.45x the speed of "read" in C
<wingo>C read goes at around 16.6 MB/s, Scheme read at around 7.8 MB/s
<wingo>with source positions enabled.
<wingo>with source positions disabled, it's 23 MB/s vs 9.8 MB/s
<wingo>i think C is recording more source positions than Scheme tho right now
<dsmith-work>Wednesday Greetings, Guilers
<dsmith-work>wingo: Were the branch-chain->table updaes made in anticpation of the read rewrite?
<wingo>dsmith-work: yeah was thinking about that. though, not sure how impactful they are for this
<wingo>there are a few table-jumps in read.go
<wingo>but, it is comforting to know that it is there
<dsmith-work>Also, does the new reader provide source positions for more than lists?
<wingo>fwiw the old one did too for any heap object other than symbols
<wingo>but the idea is to have two modes for the reader, one where we return datums and one where we return syntax objects
<wingo>which will allow e.g. numbers and such to have source locations
<wingo>golfed perf up to 10.8 MB/s
<wingo>still short of C's 15.6 or so
<wingo>with source positions
<wingo>without source positions it's C 23 MB/s, Scheme 14.3 MB/s
<narispo>wingo: what are source positions?
<wingo>file/line/column info for each read datum
<narispo>You are rewriting GNU Guile in Scheme?
<wingo>since the last 15 years or so, yes :)
<narispo>wingo: doesnt that reduce performance progressively or you have a plan?
<chrislck>narispo, meet the one and only premier guile maintainer, and his masterplan for guile...
<wingo>generally speaking things have been getting faster as they move more to scheme. speed is an important dimension but not the only one tho
<tohoyn>New debianized version 0.1.0v3 of G-Golf has been released. See
<tohoyn>daviid: your changes to <gi-flags> didn't require any action in Theme-D-Golf
<ArneBab>wingo golf-master! :-) Thank you! (sidetopic: where does the name “golf down” come from?)
<wingo>usually it's for golfing down a time, like getting a better score in gold
<dsmith-work>Doesn't that come from editors? Like getting some editing task done with the minimum number of (key)strokes.
<tohoyn>wingo: have you found any use for the improved statprof?
<daviid>rekado: for info, when i try to search the logs, it says Resource not found: - may be there is service to restart?
<ATuin>hi, is there any async http client ready to use using fibers?
<manumanumanu>wingo: Sorry to bother you, but what is the current practice of reporting errors for new code? I have some code that will make one of the scheme benchmarks a little faster :)
<manumanumanu>I mean for code in the guile project.
<manumanumanu>I have a 3x improvement for a function used in two of the benchmarks
<manumanumanu>oh. more like 2x.
<rekado>daviid: the problem is with the redirect
<rekado>it should not be but
<rekado>(i.e. remove one “/guile”)
<rekado>I haven’t been able to make enough time to fix this, but it’s on my list and I’ll get to it eventually
<rekado>sorry about that!
<daviid>rekado: it's ok, tx no problem - i also wanted to sugest, if/when possible, to add a (similar) search facility to
<manumanumanu>I just learned something about guile, folks. Using (unless can result in a lot slower code compared to if
<manumanumanu>which gets me to another point. wingo: the function is now 6x faster :D :D
<ArneBab>dsmith-work: ah, yes, that rings a bell! Thank you!
<ArneBab>dsmith-work: also code golf with the minimal number of characters (where some people actually have dedicated programming languages to facilitate it)
<ArneBab>manumanumanu: \o/
<ArneBab>manumanumanu: do you mean that unless is a lot faster now?
<ArneBab>ATuin: I only know about the http server
<dsmith-work>Or replaced unless with if to get the speedup?
<ArneBab>^ that’s the part I left out, yes :-)
<ArneBab>I wonder why unless is slower — and if we could speed up that
*ArneBab tries to resist
<ArneBab>… in vain
<manumanumanu>ArneBab: no. Switching from "(unless test MUTATION (loop (+ index 1))) result" to (cond (test result) (else MUTATION (loop (+ index 1))) => 3x faster
<ATuin>ArneBab: yeah, i saw that part. I'm investigating how difficult could be to wrap the (web client) provided by guile to use async ports instead
<dsmith-work>Because there is an extra not, and it's single-armed?
<manumanumanu>I suspect branch prediction?
<manumanumanu>or something magical. I haven't looked at the disassembly
<dsmith-work>magic was the very word I was thinking.
<ArneBab>this is unless: (define-syntax-rule (unless test stmt stmt* ...)
<ArneBab> (if (not test) (begin stmt stmt* ...)))
<ATuin>seems like the port stuff is done in http-request in that module
<ArneBab>ATuin: would be cool if you could get that going!
<leoprikler>manumanumanu: i don't think those forms are equivalent
<manumanumanu>leoprikler: that was just for illustration
<leoprikler>assuming this is (let loop ((result 0)) ...), one of the forms is tail-recursive, the other not
<ArneBab>manumanumanu: in cond the …
<ArneBab>what leoprikler said
<manumanumanu>the "result" form is outside the loop
<manumanumanu>it is the thing being mutated
<manumanumanu>whereas returning it from within the loop as the exit condition meant 3x speed improvement
<manumanumanu>leoprikler: what I did was take the code for vector-map in srfi-43, adapt it to conform to (r6rs base) and rewrite the unless to a cond.
<leoprikler>even if there's a set!, that can probably be transformed to something more efficient in the cond case
<ArneBab>very cool!
<manumanumanu>leoprikler: well, it is vector-set!, which I doubt has any boxing overhead.
<ArneBab>manumanumanu: do you by chance have the disassembly of both?
<manumanumanu>I'll just submit the patch and then I'll have a look.
<ArneBab>thank you!
<manumanumanu>leoprikler, ArneBab, dsmith-work: jesus. Forget what I said. I'll go and hang myself.
<manumanumanu>out of shame.
<leoprikler>what happened?
<manumanumanu>At least I didn't post any code.
<manumanumanu>I ended up doing about a third of the work due to a repl error for the code I tested.
<manumanumanu>It is still 2x faster, though.
<manumanumanu>but the unless stuff didn't really make any sense at all.
<leoprikler>typical case of "optimized the wrong thing"?
<manumanumanu>Nope. I just tested something and the overhead dropped by a lot. The code was correct. The repl session was not
<manumanumanu>I couldn't figure out why the tested thing was faster, and the only change was the unless -> cond. I checked another expr, and the result was valid. I wasnt benchmarking the same thing :P
<ArneBab>manumanumanu: hey, 2x faster!
<ArneBab>and no worries, it’s still awesome :-)
<manumanumanu>It is not very impressive, though. I was just spelunking through some guile modules and happened to find (rnrs base). Have a look at vector-map :D :D
<manumanumanu>I am surprised it was only about 2-3x overhead to that approach.
<ArneBab>nope, it is impressive — what you’re doing is exactly what Guile needs to become faster. It’s the many little things that create an enjoyable performance story.
<dsmith-work>Life by a thousand cuts..
<manumanumanu>How do I run a guile without instaling it using make install?
<manumanumanu>meta/guile, got it