Hlavní navigace

Názor ke zprávičce Nano 3.0 čte soubory o 70 % rychleji od Inkvizitor - To zrychleni o 70% je dost vagni informace....

  • Aktualita je stará, nové názory již nelze přidávat.
  • 10. 9. 2018 14:38

    Inkvizitor (neregistrovaný)

    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?