Hi. I was looking into how to speed up /etc/passwd parsing. Here is a trivial patch that improves pwdgrp::parse_passwd() by a tiny bit. Similar change can be applied to pwdgrp::parse_group() as well. The resulting assembler shows that it avoids recomputing the pointers into the array.
2012-02-02 Vaclav Zeman <[email protected]> * passwd.cc (pwdgrp::parse_passwd): Use reference instead of #define to access current passwd_buf element. * grp.cc (pwdgrp::parse_group): Use reference instead of #define to access current group_buf element. -- VZ
passwd.cc.diff
Description: Binary data
grp.cc.diff
Description: Binary data
passwd.s.diff
Description: Binary data
-- 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

