On 05/11/2011 09:53 PM, Zd Yu wrote:
> I use eval() to dynamically calculate performance metrics.
>
> for example:
> I have one configuration file that defines many performance metric
> formulas, like IPC=instructions/cpu_cycles.
>
> I also have another data file that contains many data samples, and I
> just call the eval() for every data sample.
>
> The problem is that I found eval() is really slow. is there a way to
> make it faster?

Can you eval your formulas into methods, and call the methods on the 
data samples?