Skip to content

Instantly share code, notes, and snippets.

View Deleplace's full-sized avatar

Valentin Deleplace Deleplace

View GitHub Profile
@Deleplace
Deleplace / Benchmark_results.md
Created November 25, 2026 15:25
Benchmark results for go/issues/81315, measured 2026-11-25

Headline: json_test.go:105-111 (Issue #81315 golang/go#81315)

Version legacy (nojsonv2) json (v1 API, v2 backend) jsonv2 (v2 API)
Go 1.27.3 4.298 ms ± 4% (266.1 MiB/s, 2 allocs) 6.995 ms ± 3% (+62.73%, 163.5 MiB/s, 3 allocs) 6.726 ms ± 8% (+56.47%, 170.1 MiB/s, 3 allocs)
Go tip (396ec8dd36) 4.592 ms ± 5% (249.1 MiB/s, 2 allocs) 5.018 ms ± 6% (+9.27%, 227.9 MiB/s, 2 allocs) 5.192 ms ± 7% (+13.05%, 220.4 MiB/s, 2 allocs)
Tip vs 1.27.3 +6.84% (VM drift; see note) -28.26% (p=0.000, 3 → 2 allocs) -22.81% (p=0.000, 3 → 2
@Deleplace
Deleplace / shrink.go
Created November 7, 2026 10:17
sync.Map shrinks
package main
import (
"fmt"
"runtime"
"sync"
)
func main() {
n := 1_000_000
a b a => b
false false true
false true true
true false false
true true true
a b a <= b
false false true
false true true
true false false
true true true
@Deleplace
Deleplace / oom_test.go
Last active March 12, 2026 08:16
Reproduce OOM in stats.MannWhitneyUTest with NaN
package oom
import (
"math"
"testing"
"github.com/aclements/go-moremath/stats"
)
func TestMannWhitneyUTest_NaN_OOM(t *testing.T) {
use std::io::prelude::*;
use std::str::FromStr;
fn main() {
// solve_a();
solve_b();
}
fn solve_a() {
let lines = std::io::stdin().lock().lines().map(|x| x.unwrap()).collect::<Vec<String>>();
@Deleplace
Deleplace / main.dart
Created December 5, 2023 17:51
fluttering-midnight-6937
void main() {
final s = "L'été";
final c = s[s.length - 1];
print("The last character of \"$s\" is '$c'");
}
@Deleplace
Deleplace / main.dart
Created December 5, 2023 17:35
fluttering-midnight-6937
void main() {
final s = "Cat";
final c = s[s.length - 1];
print("The last character of \"$s\" is '$c'");
}
@Deleplace
Deleplace / main.dart
Created October 30, 2023 22:34
oval-arc-0625
void main() {
print('Test permalink');
}
@Deleplace
Deleplace / main.dart
Created September 14, 2023 09:32
fluttering-midnight-6937
class Person {
String id;
String firstName, lastName;
Person(this.id, this.firstName, this.lastName);
@override
String toString() {
return "$firstName $lastName";
}
}