View benchstat-vs-latest-remove-interface
name old time/op new time/op delta | |
pkg:github.com/goldeneggg/structil goos:linux goarch:amd64 | |
NewFinder_Val 831ns ± 2% 971ns ± 4% +16.84% (p=0.008 n=5+5) | |
NewFinder_Val-2 831ns ± 5% 931ns ± 9% +11.98% (p=0.008 n=5+5) | |
NewFinder_Ptr 738ns ± 3% 779ns ± 1% +5.53% (p=0.008 n=5+5) | |
NewFinder_Ptr-2 778ns ± 6% 813ns ±12% ~ (p=0.421 n=5+5) | |
ToMap_1FindOnly 437ns ± 3% 405ns ± 3% -7.41% (p=0.008 n=5+5) | |
ToMap_1FindOnly-2 430ns ± 4% 426ns ± 6% ~ (p=0.587 n=5+5) | |
ToMap_2FindOnly 541ns ± 2% 574ns ± 4% +6.10% (p=0.008 n=5+5) | |
ToMap_2FindOnly-2 559ns ± 4% 580ns ± 2% ~ (p=0.103 n=5+5) |
View ci.yml
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/*.md' | |
- 'LICENSE' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' |
View Dockerfile
ARG ARG_RUBY_VERSION | |
FROM ruby:${ARG_RUBY_VERSION}-alpine3.11 | |
# hadolint ignore=DL3008,DL3018 | |
RUN apk update && \ | |
apk add --update --no-cache \ | |
build-base \ | |
bash \ | |
curl \ |
View bench_uniq_reject.rb
require 'benchmark/ips' | |
require 'benchmark/memory' | |
require 'set' | |
CLASSES = [ | |
Class.new { | |
@arr = ['1', '2', '33', '444', nil, '5555', nil, '444', '66666', 'abcde', '777777', nil, 'XXXX', '33', 'zzzzzzzzzz'] | |
def self.label |
View hoge.go2
package main | |
import "fmt" | |
func Print(type T)(s []T) { | |
for _, v := range s { | |
fmt.Println(v) | |
} | |
} |
View docker-compose.yml
version: "3.7" | |
services: | |
db: | |
image: mysql:8.0.20 | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
- MYSQL_ROOT_PASSWORD | |
- MYSQL_ALLOW_EMPTY_PASSWORD | |
volumes: |
View benchcmp.txt
benchmark old ns/op new ns/op delta | |
BenchmarkNewFinder_Val 573 595 +3.84% | |
BenchmarkNewFinder_Ptr 490 499 +1.84% | |
BenchmarkToMap_1FindOnly 450 456 +1.33% | |
BenchmarkToMap_2FindOnly 569 592 +4.04% | |
BenchmarkToMap_1Struct_1Find 585 616 +5.30% | |
BenchmarkToMap_1Struct_1Find_2Pair 975 976 +0.10% | |
BenchmarkToMap_2Struct_1Find 774 807 +4.26% | |
BenchmarkToMap_2Struct_2Find 972 986 +1.44% | |
BenchmarkNewFinderKeys_yml 116493 113303 -2.74% |
View http_client.go
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"strings" | |
"time" | |
) |
View grep.Body.Close.txt
cmd/go/http.go-28-func httpGET(url string) ([]byte, error) { | |
cmd/go/http.go-29- resp, err := httpClient.Get(url) | |
cmd/go/http.go-30- if err != nil { | |
cmd/go/http.go-31- return nil, err | |
cmd/go/http.go-32- } | |
cmd/go/http.go:33: defer resp.Body.Close() | |
cmd/go/http.go-34- if resp.StatusCode != 200 { | |
cmd/go/http.go-35- return nil, fmt.Errorf("%s: %s", url, resp.Status) | |
cmd/go/http.go-36- } | |
cmd/go/http.go-37- b, err := ioutil.ReadAll(resp.Body) |
View app.js
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const url = 'https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/lambda-runtimes.html'; | |
let $; | |
let response; | |
/** |
NewerOlder