Settings

Theme

Ask HN: Efficient Linux terminal output methods

1 points by DenisDolya 5 days ago · 0 comments · 1 min read


I’m exploring ways to write data from userspace to Linux terminals (stdout/stderr) with minimal CPU cycles, syscall overhead, and binary size, beyond the common methods I’ve considered write(), writev(), splice(), sendfile(), and io_uring—and I’d like to learn about other techniques or kernel interfaces that experienced developers use, including any lesser-known approaches, optimizations, or trade-offs; for each method, please indicate what makes it faster, more energy-efficient, or lighter in binary size, and share concrete examples, references, or microbenchmarks if available, so that I can compare options and understand real-world advantages and limitations.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection