formparse

package
v0.0.0-...-b91b1e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2019 License: BSD-2-Clause Imports: 3 Imported by: 0

README

Parsing form

Parsing a form using .Parseform requires to build a template. This template which has no internal logic has to be build on every request. Three options

  • build a global template
  • re-build the template for every parse
  • use implicit parsing

Implicit parsing has a small advantage but reduce the code size significantly.

src>go test -bench=. ./formparse

Results

go version go1.12.6 windows/amd64
pkg: github.com/iWdGo/GoCompilerEfficiency/src/formparse
BenchmarkFormParse-4              100000             23966 ns/op
BenchmarkFormParseGlobal-4        500000              3158 ns/op
BenchmarkFormParseImplicit-4      500000              2846 ns/op
PASS

Documentation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL