[Oberon] CASE without ELSE
andreas_pirklbauer at yahoo.com
Sun Feb 18 22:40:42 CET 2018
> It would take some time (more than I currently
> have!) to prove whether or not this is the case.
> suspect that there is no other single CASE in
> PO2013 that would have the same impact
> but there are a few areas in the compiler
> where CASE statements could be reinstated
> and the cumulative improvements could be significant.
I like your systematic approach to such questions. Gives
you hard data which form the basis of sound(er) arguments.
As for the potential improvements in the compilation
speed, my ingoing hypothesis would be that ORS.Get
is where the biggest improvement is still to be expected,
as it has the most cases. The others (ORP.StandFunc, ORP,StandProc and ORP.factor, etc) may cumulatively
contribute another 5-10% or so perhaps. But hard
to say without doing the experiment.
It would be instructive to construct something resembling
the “space-time map”, as shown in Arthur Sale’s
paper for modern RISC processors (or the RISC
used in PO2013). The graph shown in the paper
cannot really be used as a reliable quantitative proxy as
the Burroughs 7700 had special hardware support built in.
Nevertheless, it’s an instructive qualitative insight.
> However, this assumes that programmers have bothered
> to think about which branches are likely to occur more
> frequently and shuffle their IF-ELSIFs so they are near the top.
Or at least such that they roughly correspond to a “search tree” as described in Arthur Sale's paper. ORS.Get in PO2013 is an example, but it’s not perfect, because there, the subranges don’t lead to an optimum comparison tree.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon