Oh, I got it. Thank you for the explanation!
George Neuner 於 2020年8月9日 週日 下午1:35寫道:
>
> On 8/9/2020 1:20 AM, wanp...@gmail.com wrote:
> >
> > One more thing which bothers me is if I put a (collect-garbage) in
> > front of the testing, I got gc time: 0 if not I got gc time: 9.
> > Why can't 1 gc
On 8/9/2020 1:20 AM, wanp...@gmail.com wrote:
One more thing which bothers me is if I put a (collect-garbage) in
front of the testing, I got gc time: 0 if not I got gc time: 9.
Why can't 1 gc reclaim all memory during execution while it can before
executes?
Those numbers show *time* spent
Thanks, that make sense!
One more thing which bothers me is if I put a (collect-garbage) in front of
the testing, I got gc time: 0 if not I got gc time: 9.
Why can't 1 gc reclaim all memory during execution while it can before
executes?
Sam Tobin-Hochstadt 在 2020年8月5日 星期三下午11:44:21 [UTC+8] 的信中寫
On Wednesday, August 5, 2020 at 10:44:21 AM UTC-5 Sam Tobin-Hochstadt wrote:
> Here's a benchmark of your two functions that takes long enough to run
> that it avoids some of these issues, and also runs a GC before
> benchmarking: https://gist.github.com/7cb4645308d8572e2250833ef7b90b7c
>
What
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
7 matches
Mail list logo