Date: Thu, 3 Apr 1997 19:21:42 +0400 (MSD) From: "Alexander V. Lukyanov" <lav@video.yars.free.net> To: bugs@FreeBSD.org Subject: sscanf is slow on 2.2.1 Message-ID: <199704031521.TAA03420@video.yars.free.net>
next in thread | raw e-mail | index | archive | help
The program below works awfully slowly on FreeBSD 2.2.1, and quite normally on Solaris 2.5, Linux, Digital Unix etc. Linux on i586 100Mhz: real 0m26.020s user 0m24.240s sys 0m0.400s FreeBSD 2.1.5 on i586 66Mhz: 104.06 real 51.97 user 0.00 sys FreeBSD 2.2.1 on i586 133Mhz: 737.01 real 588.48 user 0.43 sys More than 10 times slower than 2.1.5 on a weaker system. Obviously, that time is spent inside libc. --- #include <stdio.h> int main() { int i; char str[256]; for(i=0; i<1000000; i++) sscanf("abcde","%255[a-zA-Z]",str); return 0; } --- Alexander.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704031521.TAA03420>