!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

410 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.137 Servers

Load older messages


SenderMessageTime
21 Nov 2025
@raitobezarius:matrix.orgraitobezariusremoved, indeed20:54:40
@raitobezarius:matrix.orgraitobezariusdid you notice something problematic for small lists?20:54:48
@mzero:matrix.orgmzerono, I was just looking at the string changes in the release notes and noticed it. is there any perforce impact from it? I assume lists with exactly 2 elems aren't that common, but I'm still curious.20:59:59
@raitobezarius:matrix.orgraitobezariusAFAIK, this optimization is noise when we looked21:07:47
@raitobezarius:matrix.orgraitobezariusLists with 2 elems are usually pairs in Nixlang21:07:58
@raitobezarius:matrix.orgraitobezariusUnnamed pairs21:08:07
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I did research a bit the distribution of list sizes when evaling nixpkgs. Small lists are quite often used, but lists just pale in comparison with attrsets overall21:17:12
@mzero:matrix.orgmzeroname value pairs are so common because of listToAttrs, etc, I wonder if a pair type would actually make a significant perf difference21:19:00
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)A more generic approach could be to have "attrset shapes". Very similar to how v8 optimizes classes with the same layout21:20:09
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Then names wouldn't need to be stored in the attribute set and function calls could reuse the same memory and not copy anything to a new Env. (I and Robert Hensing discussed this a bit at some point)21:21:57
@qyriad:katesiria.orgQyriad
In reply to @xokdvium:matrix.org
A more generic approach could be to have "attrset shapes". Very similar to how v8 optimizes classes with the same layout
benefits of a JIT especially
21:22:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Not exactly tho. jit/memory layout are tangential somewhat21:22:32
@qyriad:katesiria.orgQyriad yeah but you can optimize hot shapes  21:22:56
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) Yeah. I think python has slots for this kind of thing 21:23:13
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) * Yeah. I think python has __slots__ for this kind of thing 21:23:28
@mzero:matrix.orgmzerodo you have something I could read about that? I'm curious how it would work.21:25:02
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Probably staring at prior art in V8? I haven't done that myself, but I'd be curious how they do tracing to find hot shapes21:26:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)All of those optimizations are pretty inaccessible without tracing infra :(21:27:26
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)But tracing attrset shapes doesn't exactly depend on function call tracing. Computing a shape fingerprint and having a small hashmap of that could give a rough picture of the frequency.21:29:23
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)So maybe only do this for attrsets smaller than N, compute a hash of symbol table ids, store it a fixed-sized map and count frequency that way. This shouldn't have much of an overhead21:30:50
@Ericson2314:matrix.orgJohn Ericsonyeah that is in a bitrotted PR21:39:29
22 Nov 2025
@helle:tacobelllabs.nethelle (just a stray cat girl) glares at lix/nix/prefetch.cc +118 11:47:29
@helle:tacobelllabs.nethelle (just a stray cat girl)erm, why are we making a presumption there, that uh, is not actually also made by nixpkg's fetchzip (which does have stripRoot as an active choice), this with certain use cases, like what npins does, makes it impossible to compute the right hash with it11:48:57
@helle:tacobelllabs.nethelle (just a stray cat girl)(anyway, I don't think it is worth a fix, because of well, yeah)12:06:43
@adam:matrix.system72.devadam joined the room.17:06:37
@helle:tacobelllabs.nethelle (just a stray cat girl) has anyone asked about https://docs.lix.systems/manual/lix/stable/contributing/deprecated-features.html#dp-feature-nul-bytes vs https://git.lix.systems/lix-project/lix/src/commit/7e193f962e35217268e81164eef9f8be7059a84e/doc/manual/rl-next/pascal-strings.md because we should figure out how to explain that one in documentation or uh, fix the situation as we now explicitly allow them 20:18:51
@helle:tacobelllabs.nethelle (just a stray cat girl)also I think we need to rebuild all the Lix changelogs with anchors, I uh, may be in for some doing I guess, because having anchors is useful20:19:37
@helle:tacobelllabs.nethelle (just a stray cat girl) semi-related screams at the status of the Built-in Functions documentation uhhhh, we need to get some more intelligent arg handling and just combing through and writing all of it to the same standard and potentially some index gen 21:03:19
@helle:tacobelllabs.nethelle (just a stray cat girl)given that I can't do much code rn, I may do some doc patches the coming week21:03:37
@helle:tacobelllabs.nethelle (just a stray cat girl)the doc/C++ generator for that also needs some work, so yeah....21:05:18

There are no newer messages yet.


Back to Room ListRoom Version: 10