Skip to content

Instantly share code, notes, and snippets.

View benhoyt's full-sized avatar

Ben Hoyt benhoyt

View GitHub Profile
@benhoyt
benhoyt / scan.go
Created December 20, 2023 08:34
Proposed Rows.ScanRow implementation (cut-down version)
package model
import (
"database/sql"
"errors"
"fmt"
"reflect"
"sync"
)
@benhoyt
benhoyt / goversions.py
Created April 13, 2024 04:53
Measure Go version performance with GoAWK
import csv
import os
import subprocess
import time
print('| Go version | binary size (MB) | countwords (s) | sumloop (s) |')
print('| ---------- | ---------------- | -------------- | ----------- |')
@benhoyt
benhoyt / goversions.txt
Created April 13, 2024 04:54
Go version performance - table of results
| Go version | binary size (MB) | countwords (s) | sumloop (s) |
| ---------- | ---------------- | -------------- | ----------- |
| 1.0 | 3.27 | 8.20 | 9.47 |
| 1.1 | 3.95 | 7.57 | 9.54 |
| 1.2 | 5.50 | 25.51 | 9.36 |
| 1.3 | 4.27 | 2.85 | 1.99 |
| 1.4 | 4.32 | 3.03 | 2.13 |
| 1.5 | 4.73 | 2.16 | 1.16 |
| 1.6 | 4.70 | 2.15 | 1.18 |
| 1.7 | 3.94 | 1.86 | 0.63 |