get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)

Warren Young warren@etr-usa.com
Sat Feb 8 15:19:00 GMT 2014


On Feb 7, 2014, at 5:40 PM, Andrey Repin <anrdaemon@yandex.ru> wrote:

>>> I thought the point of the programme /was/ to call getpwnam() a million
>>> times.

Precisely.

> In either case, repeatedly requesting the same record in a short amount of
> time will only test the system level cache.

If that were true, moving the requested record around in /etc/passwd wouldn’t cause a 6x spread in test results. That’s O(N) type behavior, whereas a cache approaches O(1).

If SAM uses a tree-structured DB, as I suspect, it will be some logarithmic function, like O(log2(N)).
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list