Let say I have this code:
void test(){
assert(() {
print("This is Test");
});
}
As per this question, dart will remove assert
on production build
but how about test()
function which being called?
will this function be removed on build?
or will this have any significant impact on performance if I call empty function multiple times?
The compiler will optimize your code through inlining and removing calls to empty functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With