the rough numbers I have are, panic=abort reduces the size of a binary by 10%-20% on Fuchsia
@tmandry it might be interesting to try building fuchsia with
-C panic=unwind and a nightly toolchain from July, and then compare that with the current nightly toolchain.
IIRC the current toolchain does not emit
nounwind for extern C, while the one in July should do that.
That would show the impact of this particular change there.
the last numbers I gathered were from July/August timeframe
@gnzlbg if you can point me to a particular change to apply/revert I could also do that
the numbers might be a little noisy with other changes mixed in there
@tmandry let me check
@RalfJ I see https://github.com/rust-lang/rust/pull/65346 and https://github.com/rust-lang/rust/pull/65020 landed but it appears that none of these removed
nounwind from all
extern "C" definitions and declarations, did that happen somewhere already?
Ah https://github.com/rust-lang/rust/pull/63909 is not merged.
@tmandry you might want to apply https://github.com/rust-lang/rust/pull/63909 to the current nightly.
then you can just compare the current nightly with that PR, in both cases with
that should show the effect of making
extern "C" definitions and declarations allow unwinding by default
I'm breaking this out into a distinct topic
Thanks @tmandry for those numbers! Very helpful to have an upper bound, and I agree the impact is non-trivial
Given that the impact is non-trivial, it seems like it is worth trying to dig in more, since the impact of these alternatives would be more limited, and it seems like it matters
I think at this point
these measurements are the single most important thing to do
I think @gnzlbg what we really want to compare is
what is the cost if we insert "abort" shims around "C" FFI calls, but otherwise use
I don't think we can estimate that yet, do we need to do a prototype impl to do so?
(Maybe @Amanieu is interested in doing so?)
@nikomatsakis do you have a sense of what threshold should be considered "significant", and how it would impact our design decisions? The data is interesting, but I'm having a little trouble tracking how it will inform our next steps.
The size might determine whether it's reasonable to have C default to unwind or nounwind.
Or at least the impact of those choices.
nikomatsakis do you have a sense of what threshold should be considered "significant", and how it would impact our design decisions? The data is interesting, but I'm having a little trouble tracking how it will inform our next steps.
I feel like 10% is significant
I'm not saying <10% is not significant :)
I guess I think the threshold is probably somewhere around 2 or 3%? I don't really know.
I'd prefer to have the number because there are certain things where it's clear -- 0.1%, or 10% :)
in other words, I don't think there is a firm threshold
Okay, that's fair enough.