Mihai Bazon
Mihai Bazon
> `ONE WEIRD TRICK` could do the trick - resonates with the "throwaway" nature of anon functions in my EXPERT OPINION. It does sound better followed by the `WITH` keyword,...
> You can define code the same as in Python where functions need to have more than one line, you create a nested named function and return it. Yeah, I...
@phoe that's clearly one case that can be optimized. But `trivial-utf-8` only does ordinary `write-byte` and `read-byte` on the stream (it doesn't call `read-sequence` or `write-sequence`), so it's probably something...
`trivial-utf-8` isn't a hard requirement, for this case I tried `read-sequence` then `sb-ext:octets-to-string`, and performance is marginally better, but still nowhere near the native stream. And it does more consing....
Hmm.. just a quick `(sb-profile:profile "FLEXI-STREAMS")` (and reduced the number of repetitions from 500k to 10k in the function above), here's the result: ``` measuring PROFILE overhead..done seconds | gc...
Perhaps a better way would be to have separate stream classes that support transformers? It's a pity that an optional functionality that not everyone needs slows down basic operations for...
I think I'll rest my case here, which unfortunately is bad news.. I wrote my own [memory stream](https://gist.github.com/mishoo/518281f8d2a476be048abc7854790e5e). It's the simplest, dumbest code possible, and it is significantly faster than...
@avodonosov Story time :) In short, I'm working on a binary encoding to replace JSON. I believe JSON is overkill for data interchange between programs — think about how much...
@Symbolics yeah, SBCL is what I use, but I don't know about simple-streams. For now I'm happy with what I got — I won't be able to read/write directly using...
> @mishoo, if jsown does not read from / to stream, probably doing it in your library wouldn't be a fair comparison. BTW, I noticed generic functions are used in...