-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/09/2010 02:31 PM, Nicolas Williams wrote: > The trick to making that go fast is to use pthread_atfork() to get the > new PID on the child side of fork() and store the PID in a global > variable so that you don't need to call getpid().
That assumes that pthreads is in use, that getpid is poorly implemented/slow and that enough of the 1% slowdown was due to getpid calls that changing it would make a difference :-) Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw3lrsACgkQmOOfHg372QRlvACePV+jbjnvVxC6BsLZq0mvJOiG AHAAn0yjpqdhxd/MaYnk/lRbtIeMcb/K =S41l -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users