To zrychleni o 70% je dost vagni informace. Kde a jak se to merilo, nikde nepisou.
Tak tedy jsem si nasel prislusny commit:
files: speed up reading by using getc_unlocked() instead of getc()
Unlike glibc, which in getc() locks the file only when it is needed,
FreeBSD and Bionic libc will always lock the file, causing a massive
slowdown, as the system has to create and destroy a mutex each time
getc() is called.
Uznavam, ze jsem C uz delsi dobu nepouzil a muze mi neco unikat, ale to je fakt normalni cist soubor bajt po bajtu pomoci getc() v cyklu while getc() != EOF?