Re: version of euphoria ZIP
- Posted by Vincent <darkvincentdude at yahoo.com> Nov 10, 2005
- 445 views
Juergen Luethje wrote: > > Vincent wrote: > > > Juergen Luethje wrote: > >> > >> Vincent wrote: > > [snipped (not necessary to repeat the same stuff over and over again)] > > >>> Obviously effeciency is not top priority for you, but that is quite ok. > >> > >> This is not "obvious", but false and a simplistic statement. > >> Writing efficient code does not just mean using some machine specific > >> routines with comments. You might want to read the Euphoria > >> documentation carefully, in order to learn more about writing efficient > >> code. > > > > Well excuse me, when did I *ever* imply that using machine specific > > routines is the only way to improve program efficency? > > No, you did not imply that it's the *only* way to improve program > efficency. But when you write: > "Obviously effeciency is not top priority for you" > just because I do not agree with you, that generally using machine_proc() > is a good idea, then that statement implies that you think it's an > *important* way to do so. But that is not the case (as Matt also has > pointed out the day before yesterday). > Hi Juergen, It's not "important" sort of speak, but despite what Matt said, it *is* one of the *many* things you can do to improve program efficiency, in addition to improving your algorithms. It doesn't matter which way you choose as machine_proc/func is used anyway.. But directly using them eliminates the unnecessary including, scanning/parsing, extra subroutine calling, type definition (minuscule), variable (when using machine_proc instead of machine_func), and constant overhead. All this overhead is realatively small and hardly casts its shadow on Euphoria's blazing execution, but internally its quite noticable. Add a trace(1) into scanner.e then step through a few programs with the PD- source... perhaps you will notice all the expensive internal process of including files and scanning/parsing them. I'm not against "including" in general, I'm just suggesting not to abuse the feature if efficiency is really important to you. > > One of the most important factors in determinding efficency has to do > > with the algorithms one develops. > > > > FYI sir, I have read the Euphoria documentation several times, and > > overlook perform.htm/doc tips with everything I do in Euphoria. > > OK, then you probably know some ways how to really make a program more > efficient. > > >> For instance I use profile and profile_time to examine programs. > >> Depending on the program, there are several ways to make it more > >> efficient. Sometimes I write parts of a program in assembler. > > > > I suppose peeking & poking machine code is easily readable too, correct? > > As I wrote, I do so *sometimes*, in selected cases. I'm not advocating > for writing all programms in assembler. > It's like in medicine: We should get a correct diagnosis first, in order > to be able to choose an appropriate therapy. > Thats fine... you have your reasons to use it as I have mine to use machine routines. Since I dont really know any ASM, this is not an option for me. So I have to come up with other solutions like using machine routines to compensate. Of course using machine code offers complete low-level control, so eventually I'll need to at least partially understand it. > Regards, > Juergen > > -- > Have you read a good program lately? > > Regards, Vincent