View Single Post
Old 18 July 2011, 03:53   #191
Registered User
Join Date: Apr 2005
Location: Hangover
Posts: 2,232
Originally posted by 8bitbubsy in Cosmos' dos.library thread:
Is there really much to optimize in the latest system libraries from Commodore? I tried some of Cosmos' libraries and all I get is problems and black screens. I don't know much about the libraries and how they work, but wouldn't it be better to instead spend the time commenting the library source code, then do bug fixes and maybe adding new routines? Again, I know nothing about this, but I refuse to believe that the libraries are so slow that they really need to be hand-optimized by other coders, correct me if I'm wrong.

I'd rather have a stable bug-fixed system than one that is optimized by someone who doesn't know how the code originally works.
Every library which has been written in C as programming language can usually be optimized in assembler with a speed factor of two (approximately). But that does NOT mean that all application programs which are calling these library function would run twice as fast. Such a speed boost will only happen very rarely because typically an application spends just a few % of its CPU time with the execution of a certain library function and uses most of the time for doing other things. So, the average speed gain is much less than expected (maybe 1%-5%) for most library calls. And the user will not even notice that.

Some years ago, I've written a tiny utility called libXScounter, because I wanted to know how often every library function in the system is really called by applications and how much sense it makes to optimize a function. LibXsCounter.rar

Unfortunatly, publishing commented sources of the system libraries which have not been completely rewritten from scratch is still illegal as long as the AmigaOS is protected by a Copyright for commercial interests. Thus, bugfixes can only be spread as patches.
PeterK is offline  
Page generated in 0.04238 seconds with 11 queries