[PATCH] D41590: Improve performance TokenizeWindowsCommandLine
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 23:52:42 PST 2017
On Wed, Dec 27, 2017 at 4:36 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Wed, Dec 27, 2017 at 4:33 PM, Zachary Turner <zturner at google.com>
> wrote:
>
>>
>> On Tue, Dec 26, 2017 at 11:28 PM Rui Ueyama via Phabricator <
>> reviews at reviews.llvm.org> wrote:
>>
>>> ruiu added inline comments.
>>>
>>>
>>> ================
>>> Comment at: llvm/lib/Support/CommandLine.cpp:692
>>> +static bool isWhitespace(char C) {
>>> + switch(C) {
>>> + case ' ':
>>> ----------------
>>> I'd ignore formfeed and vertical tab, and write like this
>>>
>>> return C == ' ' || C = '\t' || C = '\r' || C = '\n';
>>
>> Why not just call std::isspace?
>>
>
> I think what he was trying to do is to avoid the cost of function call.
> Also, isspace is location-aware and thus not that convenient to use, no?
>
Sorry, I meant locale, not location.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171227/ccd3a257/attachment.html>
More information about the llvm-commits
mailing list