Thread overview | |||||
---|---|---|---|---|---|
|
September 07, 2016 Performance issue with GC | ||||
---|---|---|---|---|
| ||||
I have a little data processing program which makes heavy use of associative arrays, and GC almost doubles the runtime of it (~2m with GC disabled -> ~4m). I just want to ask what's the best practice in this situation? Do I just use GC.disable and manually run GC.collect periodically? |
September 07, 2016 Re: Performance issue with GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Yuxuan Shui | On Wednesday, 7 September 2016 at 21:20:30 UTC, Yuxuan Shui wrote: > I have a little data processing program which makes heavy use of associative arrays, and GC almost doubles the runtime of it (~2m with GC disabled -> ~4m). > > I just want to ask what's the best practice in this situation? Do I just use GC.disable and manually run GC.collect periodically? I'd say yes. Another option: https://github.com/economicmodeling/containers. The HashMap will give you a full control on the mem allocs. |
September 08, 2016 Re: Performance issue with GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Wednesday, 7 September 2016 at 22:54:14 UTC, Basile B. wrote:
> On Wednesday, 7 September 2016 at 21:20:30 UTC, Yuxuan Shui wrote:
>> I have a little data processing program which makes heavy use of associative arrays, and GC almost doubles the runtime of it (~2m with GC disabled -> ~4m).
>>
>> I just want to ask what's the best practice in this situation? Do I just use GC.disable and manually run GC.collect periodically?
>
> I'd say yes.
>
> Another option: https://github.com/economicmodeling/containers. The HashMap will give you a full control on the mem allocs.
This is a really nice library! Thanks a lot.
|
Copyright © 1999-2021 by the D Language Foundation