[MAGEEC] Removing dependencies from BEEBS

James Pallister James.Pallister at bristol.ac.uk
Thu Oct 3 13:15:49 BST 2013

> Let's discuss when we meet on Wednesday. 
Unfortunately I'll be in Estonia next week, and will miss the MAGEEC 

The WCET benchmarks seem to have copied in parts of the std library: the 
FFT benchmark contains implementations of sin and cos. I guess these 
could be removed for consistency. This still makes testing optimizations 


On 03/10/13 08:33, Jeremy Bennett wrote:
> On 02/10/13 20:25, James Pallister wrote:
>> Hi All,
>> I've been working on the BEEBS benchmarks recently, and was considering
>> removing dependencies on the C std library. This would involve having
>> implementations of the (few) functions used in the benchmarks as part of
>> those benchmarks themselves. For example, the encryption benchmarks use
>> rand to create the data which is to be encrypted. The rand function
>> would be incorporated as part of the benchmark.
>> Reasons for:
>>      * No external dependencies
>>      * Reduced benchmark size
>>      * When testing optimizations, the relevant standard library code
>> will also be optimized under the same optimization level. This happened
>> before with the cubic benchmark - the majority of computation is
>> performed in precompiled std library functions - cos, sin, sqrt, etc.
>> The result was that optimizing the cubic benchmark had little effect,
>> due to the precompiled std library being linked in.
>>      * The code is more independent of external factors - e.g. using
>> newlib vs uClib.
>>      * There isn't much code dependent on std library features 
>> (dijkstra,
>> cubic)
>> Reasons against:
>>      * Possible code bloat - repetition of code between benchmarks?
>>      * Repetition of code that would normally be expected to be provided
>> (std lib functions such as malloc, rand)
>>      * Additional complexity.
>> I'm currently leaning towards making the benchmarks standalone. Any
>> thoughts on whether this is a good or a bad idea?
> I'm not sure this is a good idea. The C library is a standard part of 
> any compiler system, and reasonably ought to be included.
> Let's discuss when we meet on Wednesday.
> Best wishes,
> Jeremy

More information about the mageec mailing list