Earlier quoted context omitted.
1. Each operation lists the big-O complexity; most operations are O(lg N). 2. There are no mutations 3. I think it would be rather redundant to mention that every operation that returns a new object conses.
Btw I meant quasi-mutations of course. So every quasi-mutation conses. Alright.
Modern Common Lisp with FSet
21–30 of 30 posts
Re: Modern Common Lisp with FSet
#22At a conceptual level, do these data-structures store what in other languages would be pointers and so every access would mean paying for the pointer indirection or do they store objects themselves and they are cache friendly data-structures?
Re: Modern Common Lisp with FSet
#23Earlier quoted context omitted.
Btw I meant quasi-mutations of course. So every quasi-mutation conses. Alright.
Yeah, clojure gets away with it thanks to the high performance of the available gc in the JVM. In the Common Lisp world the compiler puts quite some effort into avoiding heap allocation ("consing"); the language was designed with that in mind. Not sure where it's now, but not too long ago SBCL's gc wasn't its strong point.
Re: Modern Common Lisp with FSet
#24Balancing trade-off is crucial in software design. It would be nice if the documentation listed the trade-offs of the structures compared to their native implementations. I imagine at least every mutation is consing? There are also larger fixed and slow-growing overheads in various operations.
Re: Modern Common Lisp with FSet
#25I think the website is weird to navigate. "Next" links go to top-level headers instead of the "logical" next. For example, if I'm on "1.1 Fset Tutorial" clicking "Next" takes me to "1.2 Using Fset" instead of "1.1.1 The Major FSet Types". At a conceptual level, do these data-structures store what in other languages would be pointers and so every access would mean paying for the pointer indirection or do they store ob…
The relation of 1.1.1 to 1.1 is about drilling down into detail if you want that, where you can still peruse through at the given upper level.
Picking another random other manual, it is the same: https://www.gnu.org/software/guile/manual/html_node/index.ht...
Re: Modern Common Lisp with FSet
#26I think the website is weird to navigate. "Next" links go to top-level headers instead of the "logical" next. For example, if I'm on "1.1 Fset Tutorial" clicking "Next" takes me to "1.2 Using Fset" instead of "1.1.1 The Major FSet Types". At a conceptual level, do these data-structures store what in other languages would be pointers and so every access would mean paying for the pointer indirection or do they store ob…
When I'm reading in an Info reader (almost always in GNU Emacs) I always hit the spacebar when reading. This scrolls down a page and, if it's at the end of a page and, if at the bottom, goes to the next subnode - in other words, what "makes sense." (Actually the binding for this is "Info-scroll-up".)
That doesn't help when you're on a website, but for me Texinfo websites have a distinctive look and when I see them, I immediately know what clicking "Next" will do, and I know to instead go to the bottom of the page and go to the subnodes if that's what I want, which it typically is.
I agree that it's weird...but maybe understanding the overall weirdness of Texinfo helps it all make sense?? A more coherent weirdness?
Re: Modern Common Lisp with FSet
#27Earlier quoted context omitted.
Btw I meant quasi-mutations of course. So every quasi-mutation conses. Alright.
Yeah, clojure gets away with it thanks to the high performance of the available gc in the JVM. In the Common Lisp world the compiler puts quite some effort into avoiding heap allocation ("consing"); the language was designed with that in mind. Not sure where it's now, but not too long ago SBCL's gc wasn't its strong point.
That being said, for batch processing in single-threaded applications, the older SBCL gc is actually pretty good.
Re: Modern Common Lisp with FSet
#28Earlier quoted context omitted.
1. Each operation lists the big-O complexity; most operations are O(lg N). 2. There are no mutations 3. I think it would be rather redundant to mention that every operation that returns a new object conses.
Big-O is one thing. Big constant factor, heap fragmentation and cache locality are other useful characteristics of data structures.
As far as constant factors go, this library is a middle ground; they strive for low constant factors in their algorithms, but it relies almost entirely on generic functions, so that alone is going to limit the maximum speed in e.g. tight loops.
Re: Modern Common Lisp with FSet
#29I think the website is weird to navigate. "Next" links go to top-level headers instead of the "logical" next. For example, if I'm on "1.1 Fset Tutorial" clicking "Next" takes me to "1.2 Using Fset" instead of "1.1.1 The Major FSet Types". At a conceptual level, do these data-structures store what in other languages would be pointers and so every access would mean paying for the pointer indirection or do they store ob…
For instance, each CHAMP node is a single CL vector; the header occupies the first few slots rather than being a separate allocated ooject.
Re: Modern Common Lisp with FSet
#30Just FYI, this section at the end about R6RS Scheme is a little confused: https://fset.common-lisp.dev/Modern-CL/Top_html/Scheme-_0028... Strings are immutable [in Scheme]. Functional point update operations are not provided, presumably out of time complexity concerns, but string-append and substring are provided, and there are functions to convert to and from lists of characters; I guess the idea is that fine-graine…