Re: sparc: bpf_jit: Move four assignments in bpf_jit_compile()
From: SF Markus Elfring
Date: Sun Sep 04 2016 - 01:46:23 EST
>> I hope so. - I propose to give the refactorings "Reduce scope of variable"
>> and "Extract a function" (and the corresponding consequences) another look.
>
> So you _think_ it does. Come back with real proof.
Which test environments would you find acceptable for further clarification?
> I must also point out that these sorts of optimisations are things the
> compiler does automatically when compiling this code.
Do you take this detail for granted?
> Therefore it's highly likely that this change will make absolutely
> no difference whatsoever.
I find this outcome unlikely.
> (And no it won't improve compile speed in any justifiable way)
This was not a goal of my update suggestion for the function "bpf_jit_compile".
>> It is generally possible that a specific code generation variant will also affect
>> the run time properties you mentioned.
>
> It's _possible_? Come back with benchmarks.
Which code generation variant would be useful to be clarified further?
Should we avoid to compare software things similar to "apples" and "oranges"
(while these fruits can make more fun)? ;-)
> I must also point out that this is a "slow path" i.e. as long as it's
> not stupidly inefficient, the speed doesn't matter that much.
Can this execution path become warmer (or even "hot") for some other use cases?
> This change isn't going to improve the speed of this function by any amount
> that matters.
This is also possible.
> Unless you have some pretty damn good proof that these changes improve things,
> there is absolutely no reason to take them as-is
Would you care for a better source code structure?
> - you are making the code longer
Yes. - This is true for the suggested update in this function.
> and more difficult to read for no benefit
I proposed specific benefits for this software module.
> and wasting everyone's time in the process.
I assume that a few contributors can take the presented ideas for further considerations.
Will their value evolve a bit more later?
Regards,
Markus