Operating System - HP-UX
1755627 Members
2992 Online
108836 Solutions
New Discussion

Re: Position Independent Code

 
Mike Stroyan
Honored Contributor

Re: Position Independent Code

Just going through a .s file won't help performance. You might improve performance if you rewrite that .s file using particular assembly language operations that the compiler is not using. That is only likely if you are an expert with the assembly language and you know something about the code that can't be expressed in the C language. The compiler might not know that parameters almost always have a few particular values or that some cases are exceptionally common.
You can help the compiler with some of those details by using 'profile based optimization'. That lets the compiler refer back to information recorded by previous runs of the code. It is discussed in the optimization section of the 'C Programmer's Guide' at http://www.docs.hp.com./hpux/onlinedocs/92434-90011/92434-90011.html