Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Feature: Add ReqHeaderParser. #1721

Merged
merged 4 commits into from Jan 24, 2022

Conversation

efectn
Copy link
Member

@efectn efectn commented Jan 18, 2022

Benchmarks:

Old

Benchmark_Ctx_Body_With_Compression-4      	  849862	      1233 ns/op	     145 B/op	       7 allocs/op
Benchmark_Ctx_BodyParser_JSON-4            	 4025719	       313.4 ns/op	      32 B/op	       2 allocs/op
Benchmark_Ctx_BodyParser_XML-4             	  314671	      3698 ns/op	    1160 B/op	      24 allocs/op
Benchmark_Ctx_BodyParser_Form-4            	  464664	      3494 ns/op	     360 B/op	      13 allocs/op
Benchmark_Ctx_BodyParser_MultipartForm-4   	  715200	      2160 ns/op	     328 B/op	      12 allocs/op
Benchmark_Ctx_QueryParser-4                	  244102	      4782 ns/op	     856 B/op	      38 allocs/op
Benchmark_Ctx_QueryParser_Comma-4          	  226207	      5551 ns/op	     928 B/op	      44 allocs/op

New

Benchmark_Ctx_Body_With_Compression-4             899160              1345 ns/op             145 B/op          7 allocs/op
Benchmark_Ctx_BodyParser_JSON-4                  4736698               260.0 ns/op            32 B/op          2 allocs/op
Benchmark_Ctx_BodyParser_XML-4                    363993              3336 ns/op            1160 B/op         24 allocs/op
Benchmark_Ctx_BodyParser_Form-4                   679537              1649 ns/op             360 B/op         13 allocs/op
Benchmark_Ctx_BodyParser_MultipartForm-4          729796              1525 ns/op             328 B/op         12 allocs/op
Benchmark_Ctx_QueryParser-4                       220290              5403 ns/op             856 B/op         38 allocs/op
Benchmark_Ctx_QueryParser_Comma-4                 204379              6221 ns/op             928 B/op         44 allocs/op
Benchmark_Ctx_ReqHeaderParser-4                   199575              6579 ns/op             928 B/op         44 allocs/op

ctx.go Show resolved Hide resolved
Co-authored-by: RW <rene@gofiber.io>
@ReneWerner87 ReneWerner87 merged commit a51ec9b into gofiber:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants