Solutions and Benchmarks
Install gobenchdata to parse benchmark results and create a bench.json
go install go.bobheadxi.dev/gobenchdata@latestBuild parser
make build-parserRun benchmarks & tests
make runCreate a new challenge
make new challenge="foo bar"
ADD TWO NUMBERS
LONGEST SUBSTRING WITHOUT REPEATING CHARACTERS
MEDIAN OF TWO SORTED ARRAYS
TWO SUM
Runs: 9750609
Name | ns/op | B/op | allocs/op |
---|---|---|---|
BenchmarkAddTwoNumbers-2 | 124.200000 ns/op | 48.000000 B/op | 3.000000 allocs/op |
Runs: 36441670
Name | ns/op | B/op | allocs/op |
---|---|---|---|
BenchmarkLongestSubstringWithoutRepeatingCharacters-2 | 31.950000 ns/op | 0.000000 B/op | 0.000000 allocs/op |
Runs: 21198352
Name | ns/op | B/op | allocs/op |
---|---|---|---|
BenchmarkTestFindMedianSortedArrays-2 | 55.870000 ns/op | 32.000000 B/op | 1.000000 allocs/op |
Runs: 8820580
Name | ns/op | B/op | allocs/op |
---|---|---|---|
BenchmarkTwoSum-2 | 135.100000 ns/op | 16.000000 B/op | 1.000000 allocs/op |