Skip to content

Instantly share code, notes, and snippets.

@ShaRose
Created October 15, 2017 06:49
Show Gist options
  • Save ShaRose/34329923cdc9f5e5f955b9d2adb6e386 to your computer and use it in GitHub Desktop.
Save ShaRose/34329923cdc9f5e5f955b9d2adb6e386 to your computer and use it in GitHub Desktop.
[builder@archbuilder http-parser-git]$ git clone https://github.com/nodejs/http-parser.git
Cloning into 'http-parser'...
remote: Counting objects: 1496, done.
remote: Total 1496 (delta 0), reused 0 (delta 0), pack-reused 1496
Receiving objects: 100% (1496/1496), 671.92 KiB | 3.77 MiB/s, done.
Resolving deltas: 100% (921/921), done.
[builder@archbuilder http-parser-git]$ cd http-parser
[builder@archbuilder http-parser]$ make library
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o libhttp_parser.o
cc -shared -Wl,-soname=libhttp_parser.so.2.7 -o libhttp_parser.so.2.7.1 libhttp_parser.o
[builder@archbuilder http-parser]$ make test
cc -I. -DHTTP_PARSER_STRICT=1 -Wall -Wextra -Werror -O0 -g -c http_parser.c -o http_parser_g.o
cc -I. -DHTTP_PARSER_STRICT=1 -Wall -Wextra -Werror -O0 -g -c test.c -o test_g.o
cc -Wall -Wextra -Werror -O0 -g http_parser_g.o test_g.o -o test_g
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -c http_parser.c
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -c test.c -o test.o
cc -Wall -Wextra -Werror -O3 http_parser.o test.o -o test_fast
./test_g
http_parser v2.7.1 (0x020701)
sizeof(http_parser) = 32
response scan 1/2 100%
response scan 2/2 100%
responses okay
request scan 1/4 100%
request scan 2/4 100%
request scan 3/4 100%
request scan 4/4 100%
requests okay
./test_fast
http_parser v2.7.1 (0x020701)
sizeof(http_parser) = 32
response scan 1/2 100%
response scan 2/2 100%
responses okay
request scan 1/4 100%
request scan 2/4 100%
request scan 3/4 100%
request scan 4/4 100%
requests okay
[builder@archbuilder http-parser]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment