twharmon / slices Goto Github PK
View Code? Open in Web Editor NEWPure functions for slices.
License: MIT License
Pure functions for slices.
License: MIT License
Hi!
I've added more benchmarks and got these results on my air M1:
There are some information about benchmark in it's name: method/<type>_<slice_length> etc.
BenchmarkReverse/strings_174_pure-8 3096415 387.3 ns/op 3072 B/op 1 allocs/op
BenchmarkReverse/strings_174-8 10000 112034 ns/op 723591 B/op 1311 allocs/op
BenchmarkReverse/strings_5568_pure-8 94143 12591 ns/op 90112 B/op 1 allocs/op
BenchmarkReverse/strings_5568-8 10 107924375 ns/op 913949232 B/op 78472 allocs/op
BenchmarkReverse/int64_94_pure-8 11687761 102.4 ns/op 768 B/op 1 allocs/op
BenchmarkReverse/int64_94-8 64416 18711 ns/op 104384 B/op 625 allocs/op
BenchmarkConcat/strings_6x174_pure-8 755361 1504 ns/op 18432 B/op 1 allocs/op
BenchmarkConcat/strings_6x174-8 62305 19247 ns/op 180147 B/op 57 allocs/op
BenchmarkConcat/int64_6x174_pure-8 3307166 361.6 ns/op 4864 B/op 1 allocs/op
BenchmarkConcat/int64_6x174-8 259530 4438 ns/op 44376 B/op 51 allocs/op
BenchmarkFilter/strings_174_(len>5)_pure-8 1963303 608.7 ns/op 3072 B/op 1 allocs/op
BenchmarkFilter/strings_174_(len>5)-8 37066 32502 ns/op 166961 B/op 538 allocs/op
BenchmarkFilter/int64_94_(val>40)_pure-8 4716992 253.2 ns/op 768 B/op 1 allocs/op
BenchmarkFilter/int64_94_(val>40)-8 135060 8387 ns/op 34808 B/op 323 allocs/op
BenchmarkMap/strings_174_replace_a_b_pure-8 327822 3592 ns/op 3536 B/op 69 allocs/op
BenchmarkMap/strings_174_replace_a_b-8 8994 116112 ns/op 724056 B/op 1379 allocs/op
BenchmarkMap/int64_174_*5_pure-8 7208736 166.9 ns/op 768 B/op 1 allocs/op
BenchmarkMap/int64_174_*5-8 63901 18898 ns/op 104384 B/op 625 allocs/op
as you can see there are some performance issues. I'm going to create PR to fix them as soon as it ready :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.