What's happening here is that your function takes effectively 0 time,
but when you ran the first version, there was a GC pause during it
(that's why there's the "gc time: 9" there). GC pauses can happen at
any time, basically, so it's not something about what your function is
doing.
Here's a bench
Sorry, forgot to attach the test suite.
wanp...@gmail.com 於 2020年8月5日 週三 下午11:21寫道:
> I was working on a exercism problem named Raindrops.
>
> Problem description:
> Convert a number to a string, the contents of which depend on the number's
> factors.
>
> If the number has 3 as a factor, output
I was working on a exercism problem named Raindrops.
Problem description:
Convert a number to a string, the contents of which depend on the number's
factors.
If the number has 3 as a factor, output 'Pling'.
If the number has 5 as a factor, output 'Plang'.
If the number has 7 as a factor, output
3 matches
Mail list logo