5 ms·
I knew the C++ strings were optimized so. I do not like calling them "German". First time I see them called so (I know it, you can search yourself, as SSO -shor
by f1shy 9mo ago
I knew the C++ strings were optimized so. I do not like calling them "German". First time I see them called so (I know it, you can search yourself, as SSO -short string opt.), and looks as some kind of nationalist pride thing to me. Is certainly not a unique or new idea, many scheme/lisps implementations do that for strings AND numbers.
Downvotes coming from other connationals :) love you! I know… never say anything bad about Vaterland
- maweki 9mo agoWhat do you like to call Hungarian notation?
- masklinn 9mo ago"System's Horrendous Pile Of Shit". If anyone ever referred to Apps Hungarian that would be "Simonyi's Wish For A Proper Type System", but nobody ever does.
- f1shy 9mo agoI don’t know any other name for it. While this strings are basically SSO (or a twist of it).
- aidenn0 9mo agoFrom TFA and AndyP's slides it seems to specifically refer to a variant of SSO where, for large strings, a fixed-sized prefix of the string is stored along-side the pointer, in the same location as that fixed-size prefix would be fore SSO strings. This means that strings lacking a common prefix can be quickly compared without pointer-chasing (or even knowing if they are small vs large).
- f1shy 9mo agoWell read. basically SSO (or a twist of it)
- magnat 9mo agoAlso: * Reverse polish notation * Chinese remainder theorem * Byzantine generals problem
- f1shy 9mo agoAll names given by people who were NOT of that nationality.
- masklinn 9mo agoC++ strings are not "optimized so". C++ strings (generally) do SSO (up to 23 bytes depending on implementation), these also do SSO but only 8 bytes (to a total of 12), the first 4 bytes are always stored inline for fast lookup even when the rest of the string is on the heap (in which case they're duplicated), and the strings are limited to 4GB (32 bits length). IIRC they also have a bunch of other limitations (e.g. they're not really extensible, by design). Which is why they're "everywhere"... in databases, especially columnar storage.
- f1shy 9mo agoYes. Sorry. That was not 100% correct. Still, your words (my emphasis) >C++ strings are not "optimized so". C++ strings (generally) do SSO (up to 23 bytes depending on implementation), these also do SSO but only 8 bytes (to a total of 12) That is what I meant. I would (like you did) call it SSO still.
- ahartmetz 9mo agoDoesn't seem nationalist to me because the name seems to have been coined by the people at Cedar, not TU Munich.
- f1shy 9mo agoCedar is a german company, in case you did not know. That makes it specially nationalist.
- aidenn0 9mo agoAccording to TFA, the name was coined by Andy Pavlo, who did his undergrad in New York, Doctorate in Rhode Island, and now teaches in Pittsburgh. I see no indication that he is German. [edit] Lecture slide with the term is also linked from TFA: https://15721.courses.cs.cmu.edu/spring2024/slides/05-execution2.pdf https://15721.courses.cs.cmu.edu/spring2024/slides/05-execut...
- f1shy 9mo agoAndy Pavlo, ask anybody who knows him, is a very interesting character. I’m not sure if he really coined the name, or ist just a joke, as the one about his daughter (which I do both find funny at all). The database world (in which I was, is very interesting!) ;)