Comments (6)
Or maybe benchmark single numbers of the different cases -- not divisible by 4, 4 but not 100, and so on. It's a little crazy to benchmark a bunch of stuff all together. I think it's okay for comparing one implementation to another, but less meaningful for understanding the time of an individual operation.
from go.
Ah, I was thinking of the benchmark as comparing implementations.
Yeah, we could separate them out by case.
from go.
So how about single number tests plus a test of a 400 year period. The 400 year period would be good for comparing implementations but representing the frequency of occurrence of the cases. The individual cases might help understanding the 400 year results.
You know this pattern of benchmarking all the test cases together is just something that's easy as a comparable time. (I think the old pattern of starting and stopping the timer doesn't really work.) More interesting or more meaningful benchmarks might be devised for a number of the exercises.
from go.
So how about single number tests plus a test of a 400 year period.
That sounds very good.
from go.
leap $ go test -tags example -bench .
PASS
Benchmark2015Once-8 1000000000 2.24 ns/op
Benchmark2014Once-8 1000000000 2.26 ns/op
Benchmark1900Once-8 500000000 3.54 ns/op
Benchmark1600Once-8 500000000 3.54 ns/op
Benchmark2015x400-8 2000000 924 ns/op
Benchmark2014x400-8 2000000 929 ns/op
Benchmark1900x400-8 1000000 1401 ns/op
Benchmark1600x400-8 1000000 1405 ns/op
BenchmarkRange400-8 1000000 1049 ns/op
ok github.com/exercism/xgo/leap 18.751s
I'm not sure what it means. I would guess complexities of the CPU architecture and the the compiler code generator make this hard to understand. Maybe it's best to just use the 400 year period and not include the other tests.
from go.
Yeah, agreed. The 400 year range will at least give people a number that would simulate a varied set of inputs.
from go.
Related Issues (20)
- Improve test output for the Clock exercise
- Enable test runner v3 UI for all concept exercises
- Ensure package names are unique
- Adding concurrency concepts to the syllabus HOT 3
- Community contributions are paused for this repo
- Outdated information in the 'Randomness' section HOT 1
- ErrStop and ErrInvalidBase not defined in the test file. HOT 1
- Booking up for Beauty: Better explanations for tasks HOT 1
- Update go version to 1.21 in go.mod across all or subset of problems? HOT 1
- Remove check for short test in benchmarks
- Hello world: Error: not in workspace HOT 1
- Building a training set of tags for go HOT 22
- Bug: instructions for kindergarten_garden do not match requirements HOT 2
- Define more test cases for resistor color HOT 1
- Expanding test cases for Vehicle Purchase exercise in the Go track HOT 1
- Need for speed exercise CanFinish tests do not validate start with distance travelled HOT 1
- Inaccurate information for the "Runes" Concept HOT 1
- First Class Functions: task 5 misleading test? HOT 4
- Duplicated link in `parallel-letter-frequency` documentation. HOT 1
- Minor correction to instruction text for animal-magic instructions.md HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.