IRC channel logs
2021-10-09.log
back to list of logs
<RhodiumToad>oh, the second version of the pasted code uses algorithm: rather than algo: <ruffni>huh, lampilelo left? is there a way to leave a message for them here? <ruffni>sneek, later tell lampilelo you wondered about the performance of the two (ffi and pure scheme) implementations of sha1? https://termbin.com/prd9s test data was 10MiB of random bytes <ruffni>the pure scheme implementation is almost unbearably slow <RhodiumToad>I note it has a lot of non-inlined calls to bitwise ops <RhodiumToad>when I was testing my fast hex conversion code, I found that the overhead of using standard rnrs or srfi-60 bitwise ops rather than guile primitives like (ash) was a really big factor <ruffni>and i think the pure scheme version is buggy: for the 10MiB file the hashes are equal, but for a 1MiB random data file the ffi hash is fdab659b319221775855fab1d1eb59ff611a while the scheme implementation gives: fd0ab659b31922010775855fab1d1eb509ff611a <ruffni>when removing all the zeroes from the latter it's the same as the former <RhodiumToad>has a slightly nontrivially sized (~13k) lookup table for the hex to binary direction <ruffni>i thought i could just `(format #f "~{~x~}" (bytevector->u8-list bytevec))` :) <RhodiumToad>yeah, but that's not fast and does a hell of a lot of consing <ruffni>but in this case, this does not even really factor into what makes it slow (it's only applied to convert the bytevectors from your ffi code) <RhodiumToad>the fast hex conversions were written for something else <ruffni>gotta go, thanks again, i learned quite a bunch tonight! <lampilelo>i see the code length increased by ~50 lines while i was asleep <sneek>lampilelo, you have 1 message! <sneek>lampilelo, ruffni says: you wondered about the performance of the two (ffi and pure scheme) implementations of sha1? https://termbin.com/prd9s test data was 10MiB of random bytes <RhodiumToad>most of the increase is the (define-module) form and all those blank lines <lampilelo>i see now that there is a guile library for gcrypt too, cool <morganw>Could I ask, if using Geiser is it normal to disable the debug window which appears on error? It seems to just be a text representation of the actual debug prompt and not offering any debug features in itself. <lampilelo>it doesn't show just errors, this is where all the standard output and standard error messages are printed <morganw>That is the one, yes. I guess I haven't experimented enough to know all the purposes of it. Superficially it just seemed to be a copy of the error in the REPL with a link to jump to the file. <lampilelo>i rarely use the repl buffer, i evaluate code right from the source file buffer and the dbg window shows me the output <morganw>And just to double check, within the debugger I can fix problems and continue but there isn't an equivalent of a retry at the original point of failure (similar to what is offered with SLIME)? <stis>Just back from seeing Dune, what an experience, my taste torally <stis>So now I will take a cup of coffee and write some doocumentation