This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tiny /etc/passwd parsing optimization


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 <vhaisman@gmail.com>

ÂÂÂÂÂÂÂ * 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

Attachment: passwd.cc.diff
Description: Binary data

Attachment: grp.cc.diff
Description: Binary data

Attachment: 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]