tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patch to make <stdio.h> reentrant by default

On Fri, Apr 26, 2019 at 11:36:00PM +0200, Kamil Rytarowski wrote:
> I propose a patch that:

Too many different things at once. So the short version of the review:
- I don't see any reason for providing unlocked versions of clearerr,
  feof, ferror or fileno. No reason for inline functions either, they
  shouldn't be performance sensitive on any reasonable code.
- getc is performance sensitive. putc potentially is, but I don't have
  clear evidence for the relevant use. Just dropping the inline
  optimisation for getc results in a penalty between 3 and 10, depending
  on the architecture, for single-threaded programs. That's clearly not
  acceptable. (Conditionally) switching from getc macro to
  getc_unlocked would be reasonable on platforms like AMD64, but still
  include a 80% overhead (for static linking!) on HPPA.


Home | Main Index | Thread Index | Old Index