IRC channel logs
2021-02-17.log
back to list of logs
<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! <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>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>still short of C's 15.6 or so <wingo>without source positions it's C 23 MB/s, Scheme 14.3 MB/s <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? <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>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? <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 have a 3x improvement for a function used in two of the benchmarks <rekado>daviid: the problem is with the redirect <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 <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: do you mean that unless is a lot faster now? <ArneBab>ATuin: I only know about the http server <ArneBab>^ that’s the part I left out, yes :-) <ArneBab>I wonder why unless is slower — and if we could speed up that <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>or something magical. I haven't looked at the disassembly <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 <leoprikler>assuming this is (let loop ((result 0)) ...), one of the forms is tail-recursive, the other not <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 <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>leoprikler, ArneBab, dsmith-work: jesus. Forget what I said. I'll go and hang myself. <manumanumanu>I ended up doing about a third of the work due to a repl error for the code I tested. <manumanumanu>but the unless stuff didn't really make any sense at all. <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>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. <manumanumanu>How do I run a guile without instaling it using make install?