Pauli Jaakkola
Pauli Jaakkola
Seems like there are some fixed costs that slow down small parses...
I would guess the cost is in `(.createParser ^JsonFactory (or factory/*json-factory* factory/json-factory) ^Reader rdr)`. I don't think the varargs `assoc!` applies. And if you want a standard map the `assoc!`ing...
@borkdude I found that `JsonParser` has a `.releaseBuffered` method that you could use but I imagine it requires some annoying buffer management.
Indeed I assumed that Cheney's algorithm would be used as it is very much compatible with the "simple, interesting & fast" philosophy of Femtolisp. I was going to just implement...
> Breadth-first copying in itself might actually be faster (no stack!), but on the other hand it spreads list conses around while depth-first copying colocates them, so overall cache utilization...
>It's easy and efficient to use a lookup table indexed by object type, reserving the return value "length = 0" to represent "variable length object type". All variable sized objects...
> To ensure that the heap can be parsed, the program should store the object type in form of tag bits in the first field of the object. This is...
The performance and (implementation) simplicity stems largely from not supporting laziness. Obviously lazy parsing is possible, but I am not confident I could do it with substantially less overhead than...
I have a half-baked [XML parser combinator library](https://github.com/nilern/esco). That approach should enable your example and much more with even less memory usage. But then I thought it is probably better...
> I don't think the sorting function can be reliably retrieved in both Clojure and CLJS. Clojure: `(.comparator ^clojure.lang.Sorted m)`, CLJS: `(-comparator m)`