google / gumbo-parser

An HTML5 parsing library in pure C99
Apache License 2.0
5.16k stars 663 forks source link

performance: declare gumbo_debug as inline function #383

Open detailyang opened 7 years ago

detailyang commented 7 years ago

Now using the perf profiler on user space to benchmark gumbo_parser at Centos6.5 as the following:

perf record -g --all-user benchmarks/benchmark

It shows the gumbo_debug function will occupy approximate %1.10 On-CPU at retq instruction. screen shot 2017-04-20 at 15 12 13 and screen shot 2017-04-20 at 16 06 19

To eliminate the overhead of function call even if it's compiled on release mode, gumbo_debug should be declared as inline function.

Also apply @stevecheckoway's PR #378 to pass CI.

@nostrademons Can you have a look at it ? Many thanks !

googlebot commented 7 years ago

So there's good news and bad news.

:thumbsup: The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

:confused: The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.