Skip to content

Conversation

@djc
Copy link
Owner

@djc djc commented Jul 2, 2020

No description provided.

@197g
Copy link

197g commented Jul 2, 2020

https://gist.github.com/HeroicKatora/9d3e4c179e2460e550b65630903d2674

Here are some ideas for speeding up field selection, in particular when only few fields are requested. Execute the benchmarks, hope they are as convincing on your machine as on mine.

test bench_char        ... bench:         124 ns/iter (+/- 4)
test bench_char_few    ... bench:          96 ns/iter (+/- 7)
test bench_indexed     ... bench:         101 ns/iter (+/- 4)
test bench_indexed_few ... bench:           5 ns/iter (+/- 0)
test bench_split       ... bench:         120 ns/iter (+/- 3)
test bench_split_few   ... bench:          87 ns/iter (+/- 3)

@djc
Copy link
Owner Author

djc commented Jul 4, 2020

@HeroicKatora thanks, I'll see if that helps at the macro level.

@197g
Copy link

197g commented Jul 4, 2020

I would test integrating them but I don't have anything to execute the benchmarks against. I'm just a bit annoyed that the Go version is faster, no other personal use :)

@djc
Copy link
Owner Author

djc commented Jul 9, 2020

I integrated your changes -- I found some issues which I corrected enough to make the tests pass (see the commit I pushed). However, it looks like the performance is still a wash against current master.

@djc djc changed the base branch from master to main October 29, 2020 09:04
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.

3 participants