Skip to content

ei_nested cleanup

Submitted by Benoit Jacob

Assigned to Benoit Jacob

Link to original bugzilla bug (#76)

Description

Created attachment 11

ei_nested cleanup

ei_nested still contains "temporary" clumsy code from the "Dynamic=-1" changes. This patch cleans it up, and also does something slightly more "nontrivial":

remember how we were doing

CostEval   = (N+1) * int(ScalarReadCost),  

CostNoEval = (N-1) * int(CoeffReadCost)  

these formulas are a bit counterintuitive and it takes me a while everytime to remember that they come from the fact that what we really want to compare is

CostEval   = (N+1) * int(ScalarReadCost) + CoeffReadCost,  

CostNoEval = N     * int(CoeffReadCost)  

and we "simplified" this formula since only the difference mattered. I think this was a stupid optimization, and moreover, it became really annoying in writing the updated formula as it forced me to special-case N==1.

So i've removed this "simplification" :-) I think the formulas are cleaner and more intuitive now.

Patch 11, "ei_nested cleanup":

ei_nested_cleanup

Blocking

#48 (closed)