Re: (not) handling new programming idioms with grace
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: (not) handling new programming idioms with grace
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2018年7月21日 09:27:05 -0300
> If the emergency collection became the standard behavior of io.open I
> suspect that "beware that opening a file in Lua may trigger a full GC"
> would become one of those dreaded folk-wisdom performance tips.
In a generational collector, any allocation can trigger a major
collection. io.open allocates memory (to create the stream handle),
so this dreaded folk-wisdom performance tip is bound to happen anyway.
(Or maybe not?)
-- Roberto