s/code/cost
On Tuesday, March 18, 2025 at 10:22:48 PM UTC+8 [email protected] wrote:
> Inline cost is estimated at compile time, not the real code.
>
> But I sorry to say "*new(T) has a smaller inline cost than T{}". it is a
> little larger in fact.
> The inline cost of new(T) is smaller than T{}. I got it mixed up.
>
> On Tuesday, March 18, 2025 at 2:39:19 PM UTC+8 Dan Kortschak wrote:
>
>> On Mon, 2025-03-17 at 21:03 -0700, [email protected] wrote:
>> > I prefer *new(T) over T{}, because not only the reason here, but also
>> > the former has a smaller inline cost.
>>
>> What do you mean by "inline cost"?
>>
>> https://godbolt.org/z/h8Krq7W8G
>>
>>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/20e44f9b-cfc9-4536-a759-7d6160390869n%40googlegroups.com.