strategy got the best results in general. The use
of random collection reached the best improve-
ments. This strategy is the best for cBench in API,
APIE, and NPI. The improvements of the simu-
lated annealing are qualitative improvements, i.
e., the cases in this collection reaches good im-
provements, but they cover a small number of pro-
grams. It can be seen in the results obtained by
SPEC CPU2006. We also must highlight that the
random approach in SPEC CPU2006 achieves the
best API and NPI. The use of the collection with
all cases not always obtained the best improve-
ment. It occurs due to the potential previous cases
is selected based on training programs, and not
based on test programs. When the system uses
the collection that store all cases, it can chooses
a different case to validate the same test program.
Note that a good case for a training program, not
always is best for a test program.
Similarities. The similarity models have different
performance. In cBench, the Jaccard similar-
ity model reached the best results. This model
achieved the best improvements, and covered the
most programs. In SPEC CPU2006, we have
an scenario that Euclidean distance improved the
most programs in general (NPI). However, the
best percentage improvement for all programs
(API) was obtained by Jaccard, and the best
percentage improvement excluding the programs
showing no improvement(APIE) was obtained by
Cosine.
Analogies. Increasing the number of analogies in-
creases the API, APIE and NPI. This increase
happens because when we choose more optimiza-
tion sets to evaluate, we increase the probability
of chosing a good case. In general, 3 analogies in-
creases the performanceup to 15%, and the cover-
age up to 61%, respectively. While, using 5 analo-
gies increases the performance up to 4%, and the
coverage up to 71%. Both, comparing with a con-
figuration that uses only 1 analogy. This give us
an idea that if we have two similar programs P
and Q, and the optimization set S that is good for
P, there is a high probability of S be good for Q.
Otherwise, if S is a bad solution for P it also has a
high probability of being a bad solution for Q.
Test Programs. Observing our two benchmarks,
SPEC CPU2006 can not be covered by our past
examples. cBench reached best results evaluating
this criteria. It indicates that cBench is more sim-
ilar to microkernels than SPEC CPU2006.
Feature. The most informative dynamic features
obtained the best results, specially in SPEC
CPU2006. For cBench, not only dynamic features
are required to cover all programs, we need some
static features too.
6.2 CBR and Best10
In order to compare the performance of our CBR ap-
proach, we implemented the Best10 algorithm pro-
posed by Purini and Jain (Purini and Jain, 2013).
The Best10 algorithm finds the best 10 compiler op-
timization sets that cover several programs. To find
these sets, it is necessary to downsample the compiler
search space. It is done extracting from each train-
ing program, the best case from each collection of
previous cases. In our experiments this new collec-
tion has 183 cases. After excluding the redundancies,
the Best10 algorithm reduces the sample space in 10
cases. The work of Purini and Jain details this algo-
rithm (Purini and Jain, 2013).
Tables 8 and 9 show the best results for each
benchmark, using CBR with 5 analogies (the best
configuration). In addition, these tables show the re-
sults obtained by Best10 algorithm.
The best results obtained by each program indi-
cates that our CBR apprach is able to outperform the
well-engineered compiler optimization level O3, and
Best10 in severalprograms. CBR outperformsBest10
in 21 programs of cBench, and 15 programs of SPEC
CPU2006.
The results show several configurations reaches
the best improvements, mainly for SPEC CPU2006
and CRC32
1
. In addition, these improvements are
better than that obtained by Best10.
The results also indicate that CBR approach is bet-
ter when using with cBench than SPEC CPU2006. In
cBench, only for 6.45% of programs our CBR ap-
proach did not find a good previous case. This per-
centage increases in SPEC CPU2006 (26.32%). It in-
dicates that our approach needs to be improved, in or-
der to achieve better performance in complex bench-
marks and cover more programs.
The improvement obtained by the CBR approach
is better than that obtained by Best10, in cBench and
SPEC CPU2006. In fact, Best10 does not outperform
CBR. It indicates that the best choice is to analyze
1
For CRC32 the configurations that reach the best improvement
are AL.DF.MI.E, AL.SF.AL.J, AL.SF.AL.C, AL.SF.AL.E, SA.DF.AL.J,
SA.DF.MI.J, SA.DF.WE.J, SA.DF.AL.C, SA.DF.MI.C, SA.DF.WE.C,
SA.DF.AL.E, SA.DF.MI.E, SA.DF.WE.E, SA.SF.AL.J, SA.SF.AL.C,
SA.SF.AL.E, RA.DF.MI.J, RA.DF.MI.C, RA.DF.MI.E, RA.SF.AL.J,
RA.SF.AL.C, RA.SF.AL.E, GR.DF.MI.C, GR.SF.AL.J, GR.SF.AL.C,
GR.SF.AL.E, GT.DF.AL.J, GT.DF.MI.J, GT.DF.WE.J, GT.DF.AL.C,
GT.DF.WE.C, GT.DF.AL.E, GT.DF.MI.E, GT.DF.WE.E, GT.SF.AL.J,
GT.SF.AL.C, and GT.SF.AL.E.
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
512