3 ms·
Neat! I wonder if the character decoding & regex usage has noticeable performance impact. My Common Lisp version was sped up somewhat by switching from a charac
by tazjin 7y ago
Neat! I wonder if the character decoding & regex usage has noticeable performance impact. My Common Lisp version was sped up somewhat by switching from a character stream to a byte stream: https://git.tazj.in/tree/fun/wcl/wc.lisp https://git.tazj.in/tree/fun/wcl/wc.lisp
You can try this one via Nix with:
nix-build -E '(import (builtins.fetchGit "https://git.tazj.in") {}).fun.wcl'
- patrec 7y agoIt's been a while since I last wrote CL but I think your program can produce any counts between zero and the correct one – you need to use eql instead of eq if you want this to work in standard common lisp.
- tazjin 7y agoAh, you're right of course - fixed. Though that still won't make this portable, as I'm using an SBCL-specific way of accessing argv.
- gmfawcett 7y agoThat's a very impressive Nix configuration. Nicely done!