Subject: Re: q_to_b() question
To: Jaromír Dolecek <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 09/20/2000 08:40:38
firstname.lastname@example.org (Jaromír Dolecek) writes:
> Would it make sense to add uio-aware versions of those
> two functions (either add new q_to_u() and u_to_q()), so that
> the I/O would happen directly to/from userland and
> one memory-to-memory copy would be avoided ? This would primarily
> have some effect for pty's, but might also save a few cycles
> in the keyboard/mouse drivers.
Premature optimization is the root of all evil.
I'd suggest actually demonstrating that this coding style has some
measurable, non-trivial cost before going off and optimizing it...
and then actually commiting any optimization if there's measurable
It's not like applications you quote are often considered
"bandwidth-intensive" drivers, though you could potentially push a
bunch of data through PTYs.
Anyway, the point is: "sense" in this case shouldn't be initially
determined by a few voices on this mailing list. Rather it should be
first determined by performance measurement and analysis.