Live data from Hacker News

Linux Pipes Are Slow

qsantos.fr

1–10 of 171 posts

Re: Linux Pipes Are Slow

#3
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

Pipes are extremely useful. But I guess it just depends on your use case. I do a lot of scripting.

If you dislike their (relative) slowness, it's open source, you can participate in making them faster.

And I'm sure that after this HN post we'll see some patches and merge requests.

Re: Linux Pipes Are Slow

#4
post #3
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

Pipes are extremely useful. But I guess it just depends on your use case. I do a lot of scripting. If you dislike their (relative) slowness, it's open source, you can participate in making them faster. And I'm sure that after this HN post we'll see some patches and merge requests.

+1 yes pipes are what shell scripting quite useful and allow for easy composition of the different unix shell utilities

Re: Linux Pipes Are Slow

#5
post #3
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

Pipes are extremely useful. But I guess it just depends on your use case. I do a lot of scripting. If you dislike their (relative) slowness, it's open source, you can participate in making them faster. And I'm sure that after this HN post we'll see some patches and merge requests.

The very thing that makes pipes useful is what also makes them slow. I don't think there is much we can do to fix that without breaking POSIX compatibility entirely.

Personally I think there's much worse ugliness in POSIX than pipes. For example, I've just spent the last couple of days debugging a number of bugs in a shell's job control code (`fg`, `bg`, `jobs`, etc).

But despite its warts, I'm still grateful we have something like POSIX to build against.

Re: Linux Pipes Are Slow

#6
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

> just never use pipes.

vmslice doesn't work with every type of file descriptor. eschewing some technology entirely because it seems archaic or because it makes writing "the fastest X software" seem harder is just sloppy engineering.

> they are just not useful.

Then you have not written enough software yet to discover how they are useful.

Re: Linux Pipes Are Slow

#7
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

You can replace a 10k line python or shell script with a single creative line of pipes/xargs/etc on the cli.

It's incredibly valuable on the day to day.

Re: Linux Pipes Are Slow

#10
post #2

just never use pipes. they are some weird archaism that need to die :P the only time ive used them is external constraints. they are just not useful.

That's like telling a builder never to use nails but turn to adhesives instead. He will look at his hammer and his nails as well as a stack of 2x4s, grin and in no time slap together a box into which he will stuff you with a bottle of glue with the advice to now go and play while the grown-ups take care of business.

Sure, you could build that box with glue and clamps and ample time, sure it would look neater and weigh less than the version that's currently holding you imprisoned and if done right it will even be stronger but it takes more time and effort as well as those glue clamps and other specialised tools to create perfect matching surfaces while the builder just wielded that hammer and those nails and now is building yet another utilitarian piece of work with the same hammer and nails.

Sometimes all you need is a hammer and some nails. Or pipes.

Post reply on HN