Re: Strings for operators

David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Sat, 10 May 2003 14:03:01 -0400
Newsgroups gmane.comp.lang.moto.devel
Message-ID <[email protected]>
Have you tried profiling the interpreter ? To do so all you need to do 
is add a -pg flag to the CFLAGS in the makefiles in src/codex and 
src/moto and rebuild. Then you can go into the tests folder and run a 
test like

../bin/moto -X../mx util_vector.moto

and see where the bottlenecks are with

gprof ../bin/moto | less

-Dave

On Friday, May 9, 2003, at 09:38  AM, Stefano Corsi wrote:

>> Here is something else worth thinking about with regard to operator
>> overloading. Would it be possible to take out all the custom code in
>> motoi and motoc for string addition (and addition of elementary types
>> to strings) and replace it with overloaded operation functions ?
>
> Uhm... I'll give a look. Sounds possible... maybe there's some 
> overhead in
> interpreted mode...
> By the way, I've managed to gain some speed in 
> motox_try_overloaded_method_op,
> by checking if first operand is an object  (i.e ref type but not 
> array) and
> exiting if not the case. I still have to find a way to increase 
> performance
> in motox_try_overloaded_function_op.
>
> Stefano
>