News for hackers. Stuff that matters.
Re:Why does an extraneous build step make my Zig app 10x fas... by zamfi on Wednesday March 20, 2024 @08:50AM (#39765706)
Can’t speak for OP, but one might reasonably expect later stages to only start execution once at least some data is available—rather than immediately, before any data is available for them to consume.

Of course, there many reasons you wouldn’t want this—processes can take time to start up, for example—but it’s not an unreasonable mental model.

Re:Why does an extraneous build step make my Zig app 10x fas... by Joker_vD on Wednesday March 20, 2024 @09:28AM (#39766159)
Well, it could be implemented like this, it's just more cumbersome than "create N-1 anonymous pipes, fork N processes, wait for the last process to finish": at the very least you'll need to select() on the last unattached pipe, and when job control comes into the picture, you'd really would like the "setting up the pipeline" and "monitoring the pipeline's execution" parts to be disentangled.
Re:Why does an extraneous build step make my Zig app 10x fas... by OJFord on Wednesday March 20, 2024 @08:57AM (#39765792)
Not even that they might be particularly slow to start in absolute terms, but just that they might be slow relative to how fast the previous stage starts cranking out some input for it.

(Since, as GP said, not an infinite buffer.)