Translator/Compiler Hints
- Posted by "Daniel Kluss" <codepilot at netzero.net> Dec 03, 2003
- 555 views
This is a multi-part message in MIME format. ------=_NextPart_000_0004_01C3B927.529D27C0 charset="iso-8859-1" I purpose some sort of hints for translators/compilers for euphoria, that tell certain things about the program and speed up the compiled program, but be completly ignored by interpeter. These hints would include things like profiling, unregistering variables, variable sizes and types, inlining of function/procedures, inlining of assembly/C calls. These hints are there for the purpose of optimization of size(memsize and disk size) and speed. The need for thses hints come from observing very poor performance doing software graphics or heavy math in pure euphoria. The performance of other more control centered processing is very good and doesn't need the hints. Some example of the hints may be: specifying type classes like C for atoms and ints -----> char/short/long/longer(forgot what a 64bit int is)/float/double/extdouble(80bit) for sequences -> the C style struct may be good or maybe simple things like char arrays profiling is currently absent from compiled/translated euphoria, adding that would be good and maybe a different from though, use the ReadTimeStamp instruction to get tick accurite profiling unregistering variables, say your working with large arrays, it is somtimes nessasary to be able to dynamically free up that memory used by them. inlining of functions/procedures, If you like to right clean code, and want the speed back thats wasted on procedure/function calls, especially if called very often, then you may wish to make it inline and cut away that speed loss inlining of assembly/C calls, while the new c_func()/c_proc do go along way I think there still may be a way to make them better, thus I purpose a method for allowing the assembly to be more integrated with the inlining and TYPEing in the new hints size hints, for when you are making a huge sequence, or huge char array, or huge float array, actually allocates the mem instead of just making copies of stuff I think that kind of covers alot, but maybe not so well. I would like comments, cause this all sounds pretty cool to me. I'm not at all fond of C, but I do like the speed of it for Graphics/HeavyMath so I want to give myself and everyone else an excuse not to ever use it again. And I like Assembly just fine, I just don't like righting whole pieces of code in it because of the weaknesses of euphoria, so I want to make it stronger. And another application that comes to mind is networking protocols or servers transfering data quickly. In summary, just add hints to help the compiler/translator make better code, and in the process make euphoria way more usefulll. Daniel Kluss(xerox_irs at lvcm.com or codepilot at netzero.net or xerox_irs at hotmail.com, redundancy makes the world go round) ------=_NextPart_000_0004_01C3B927.529D27C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1276" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>I purpose some sort of hints for translators/compilers for euphoria, that tell certain things about the program and speed up the compiled program, but be completly ignored by interpeter.</FONT></DIV> <DIV><FONT face=Arial size=2>These hints would include things like profiling, unregistering variables, variable sizes and types, inlining of function/procedures, inlining of assembly/C calls. These hints are there for the purpose of optimization of size(memsize and disk size) and speed.</FONT></DIV> <DIV><FONT face=Arial size=2>The need for thses hints come from observing very poor performance doing software graphics or heavy math in pure euphoria. The performance of other more control centered processing is very good and doesn't need the hints.</FONT></DIV> <DIV><FONT face=Arial size=2>Some example of the hints may be:</FONT></DIV> <DIV><FONT face=Arial size=2>specifying type classes like C</FONT></DIV> <DIV><FONT face=Arial size=2>for atoms and ints -----> char/short/long/longer(forgot what a 64bit int is)/float/double/extdouble(80bit)</FONT></DIV> <DIV><FONT face=Arial size=2>for sequences -> the C style struct may be good or maybe simple things like char arrays</FONT></DIV> <DIV><FONT face=Arial size=2>profiling is currently absent from compiled/translated euphoria, adding that would be good</FONT></DIV> <DIV><FONT face=Arial size=2>and maybe a different from though, use the ReadTimeStamp instruction to get tick accurite profiling</FONT></DIV> <DIV><FONT face=Arial size=2>unregistering variables, say your working with large arrays, it is somtimes nessasary to be able to dynamically free up that memory used by them.</FONT></DIV> <DIV><FONT face=Arial size=2>inlining of functions/procedures, If you like to right clean code, and want the speed back thats wasted on procedure/function calls, especially if called very often, then you may wish to make it inline and cut away that speed loss</FONT></DIV> <DIV><FONT face=Arial size=2>inlining of assembly/C calls, while the new c_func()/c_proc do go along way I think there still may be a way to make them better, thus I purpose a method for allowing the assembly to be more integrated with the inlining and TYPEing in the new hints</FONT></DIV> <DIV><FONT face=Arial size=2>size hints, for when you are making a huge sequence, or huge char array, or huge float array, actually allocates the mem instead of just making copies of stuff</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I think that kind of covers alot, but maybe not so well. I would like comments, cause this all sounds pretty cool to me. I'm not at all fond of C, but I do like the speed of it for Graphics/HeavyMath so I want to give myself and everyone else an excuse not to ever use it again. And I like Assembly just fine, I just don't like righting whole pieces of code in it because of the weaknesses of euphoria, so I want to make it stronger. And another application that comes to mind is networking protocols or servers transfering data quickly.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>In summary, just add hints to help the compiler/translator make better code, and in the process make euphoria way more usefulll.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Daniel Kluss(<A href="mailto:xerox_irs at lvcm.com">xerox_irs at lvcm.com</A> or <A href="mailto:codepilot at netzero.net">codepilot at netzero.net</A> or <A href="mailto:xerox_irs at hotmail.com">xerox_irs at hotmail.com</A>, redundancy makes ------=_NextPart_000_0004_01C3B927.529D27C0--