From: Joel VanderWerf Date: 2011-05-12T14:22:55+09:00 Subject: Re: how to make eval() faster? 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?