GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bogdandrutu/lazyproto

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
benchmarks
benchmarks
 
 
cmd/protoc-gen-go_lazyproto
cmd/protoc-gen-go_lazyproto
 
 
features
features
 
 
generator
generator
 
 
gogo
gogo
 
 
testproto
testproto
 
 
variant
variant
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

lazyproto

First version:

GOROOT=/usr/local/Cellar/go/1.17.6/libexec #gosetup
GOPATH=/Users/lazy/.go #gosetup
/usr/local/Cellar/go/1.17.6/libexec/bin/go test -c -o /private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test github.com/bogdandrutu/lazyproto/benchmarks #gosetup
/private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test -test.v -test.paniconexit0 -test.bench . -test.run ^$
goos: darwin
goarch: amd64
pkg: github.com/bogdandrutu/lazyproto/benchmarks
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkMarshalUnmarshal_LazyProto
BenchmarkMarshalUnmarshal_LazyProto-16    	  257985	      4835 ns/op	    3112 B/op	      89 allocs/op
BenchmarkMarshalUnmarshal_Google
BenchmarkMarshalUnmarshal_Google-16       	   97891	     12223 ns/op	    3928 B/op	      98 allocs/op
BenchmarkMarshalUnmarshal_GoGo
BenchmarkMarshalUnmarshal_GoGo-16         	  357652	      3312 ns/op	    2768 B/op	      57 allocs/op
PASS

Process finished with the exit code 0

Remove "unknown fields", similar with current gogo, not sure is a good idea though:

GOROOT=/usr/local/Cellar/go/1.17.6/libexec #gosetup
GOPATH=/Users/lazy/.go #gosetup
/usr/local/Cellar/go/1.17.6/libexec/bin/go test -c -o /private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test github.com/bogdandrutu/lazyproto/benchmarks #gosetup
/private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test -test.v -test.paniconexit0 -test.bench . -test.run ^$
goos: darwin
goarch: amd64
pkg: github.com/bogdandrutu/lazyproto/benchmarks
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkMarshalUnmarshal_LazyProto
BenchmarkMarshalUnmarshal_LazyProto-16    	  272515	      3908 ns/op	    2152 B/op	      89 allocs/op
BenchmarkMarshalUnmarshal_Google
BenchmarkMarshalUnmarshal_Google-16       	   97960	     11974 ns/op	    3928 B/op	      98 allocs/op
BenchmarkMarshalUnmarshal_GoGo
BenchmarkMarshalUnmarshal_GoGo-16         	  362098	      3301 ns/op	    2768 B/op	      57 allocs/op
PASS

Process finished with the exit code 0

Make messages members non-nullable:

GOROOT=/usr/local/Cellar/go/1.17.6/libexec #gosetup
GOPATH=/Users/lazy/.go #gosetup
/usr/local/Cellar/go/1.17.6/libexec/bin/go test -c -o /private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test github.com/bogdandrutu/lazyproto/benchmarks #gosetup
/private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test -test.v -test.paniconexit0 -test.bench . -test.run ^$
goos: darwin
goarch: amd64
pkg: github.com/bogdandrutu/lazyproto/benchmarks
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkMarshalUnmarshal_LazyProto
BenchmarkMarshalUnmarshal_LazyProto-16    	  352713	      3394 ns/op	    3216 B/op	      49 allocs/op
BenchmarkMarshalUnmarshal_Google
BenchmarkMarshalUnmarshal_Google-16       	   97819	     12084 ns/op	    3928 B/op	      98 allocs/op
BenchmarkMarshalUnmarshal_GoGo
BenchmarkMarshalUnmarshal_GoGo-16         	  349899	      3335 ns/op	    2768 B/op	      57 allocs/op
PASS

Process finished with the exit code 0

Use variant from @tigrannajaryan instead of interface{}:

GOROOT=/usr/local/Cellar/go/1.17.6/libexec #gosetup
GOPATH=/Users/lazy/.go #gosetup
/usr/local/Cellar/go/1.17.6/libexec/bin/go test -c -o /private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test github.com/bogdandrutu/lazyproto/benchmarks #gosetup
/private/var/folders/5c/5p_3jmvd6qx0rsvmb9j7c_s00000gn/T/GoLand/___gobench_github_com_bogdandrutu_lazyproto_benchmarks.test -test.v -test.paniconexit0 -test.bench . -test.run ^$
goos: darwin
goarch: amd64
pkg: github.com/bogdandrutu/lazyproto/benchmarks
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkMarshalUnmarshal_LazyProto
BenchmarkMarshalUnmarshal_LazyProto-16    	  347965	      3058 ns/op	    2992 B/op	      37 allocs/op
BenchmarkMarshalUnmarshal_Google
BenchmarkMarshalUnmarshal_Google-16       	   93165	     11942 ns/op	    3928 B/op	      98 allocs/op
BenchmarkMarshalUnmarshal_GoGo
BenchmarkMarshalUnmarshal_GoGo-16         	  342450	      3527 ns/op	    2768 B/op	      57 allocs/op
PASS

Process finished with the exit code 0

About

No description, website, or topics provided.

Resources

Readme
Apache-2.0 license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.