Skip to content

Fix inefficient recursion in Value.All#44

Open
Lykathia wants to merge 1 commit into
masterfrom
lykathia/all-recursion
Open

Fix inefficient recursion in Value.All#44
Lykathia wants to merge 1 commit into
masterfrom
lykathia/all-recursion

Conversation

@Lykathia

Copy link
Copy Markdown
Member

Included a benchmark, updated to go 1.26 to get b.Loop from 1.24.

Before:

goos: linux
goarch: amd64
pkg: github.com/tailscale/hujson
cpu: AMD Ryzen AI 9 HX 370 w/ Radeon 890M

BenchmarkAll-24    	 1549588	       724.1 ns/op	    1200 B/op	      49 allocs/op

After:

goos: linux
goarch: amd64
pkg: github.com/tailscale/hujson
cpu: AMD Ryzen AI 9 HX 370 w/ Radeon 890M
BenchmarkAll-24    	 2830897	       405.5 ns/op	     680 B/op	      31 allocs/op

@Lykathia
Lykathia requested a review from dsnet July 18, 2026 02:02
@Lykathia
Lykathia force-pushed the lykathia/all-recursion branch from 712bc95 to 093f83f Compare July 18, 2026 02:04
Included a benchmark, updated to go 1.26 to get b.Loop from 1.24.

Before:

    goos: linux
    goarch: amd64
    pkg: github.com/tailscale/hujson
    cpu: AMD Ryzen AI 9 HX 370 w/ Radeon 890M

    BenchmarkAll-24    	 1549588	       724.1 ns/op	    1200 B/op	      49 allocs/op

After:

    goos: linux
    goarch: amd64
    pkg: github.com/tailscale/hujson
    cpu: AMD Ryzen AI 9 HX 370 w/ Radeon 890M
    BenchmarkAll-24    	 2830897	       405.5 ns/op	     680 B/op	      31 allocs/op

Signed-off-by: Evan Lowry <evan@tailscale.com>
@Lykathia
Lykathia force-pushed the lykathia/all-recursion branch from 093f83f to 05bb36c Compare July 18, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant