Conversation
2d0b22e to
9f2de2f
Compare
9f2de2f to
21e81ed
Compare
21e81ed to
bb7e92e
Compare
|
Force pushed to go beyond the formatting errors. I hope to take a look at the performance report. EDIT: it looks like it is net neutral (essentially) @roberth. |
A Cross Index, short for Cross Platform Pair Index, is the essential shape of a splice, without the invoking the more mind bending concept of adding variations of for these 6 pairings to an existing thing so that it can be switched out for something else. So the purpose of a Cross Index is to contain the result of `f`\ (which may be reified in code, or just an abstract concept): - f "build" "build" - f "build" "host" - ... Splicing on the other hand refers not just to these six variants, but to the idea of tacking them onto one of the variants. (hostTarget, I believe) Cross Indexes are a necessity for making cross compilation work, but splicing is more than necessary.
bb7e92e to
f8566d2
Compare
|
@roberth can this be used to simplify Nix's packaging too? |
This would need to be tested on a cross package set to assess eval impact, as all the overhead would be there rather than in a native one. |
|
@emilazy Good news NumbersWith bench -- 'nix-instantiate --argstr crossSystem aarch64-linux --argstr system x86_64-linux -A nix -A nixfmt -A python3Packages.transformers -A pandoc'Before: After: So those are too noisy, as usual.
So that's a movement from value allocations to closure allocations, but the total allocations are up insignificantly. The insignificant overhead (on the order of 0.05%) could easily be counteracted by future cleanups that remove the conversions and make things work with the single representation throughout. |
These functions were adapted from NixOS/nix#13073, so we can switch to these implementations instead. I'd recommend to do so in January, which is when we can forget about 25.05. |
|
@roberth oh does the in-Nixpkgs packaging not need them? |
This PR aims to achieve two things:
I'm really not sure about (2). "Splice" is a nice name. It has got a bad reputation due to the "tacking on" aspect, but I don't know if we should let that taint the concept of splicing. Alternatively, we could call that part of splicing "carousel" - which as a term also covers the pattern we have for multiple outputs. To define that briefly, it's the pattern where
@Ericson2314 wdyt? Should we add a new term to underpin splicing, or add a term for the part people don't like, or both? (cross index + carousel = splicing)
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.