Posted: Sat May 03, 2008 6:49 am
I have some experience with it after writing drivers in BASIC for my OS. Yes it is possible to get reasonably fast drivers, but you should be aware of the many possible cycle eaters that are all around.Khumba wrote:I'd like to see how efficient drivers written in a high-level language can be.
If you'd write a disk driver in a high level language, you'd notice no real difference in speed. The main time sink is within spinup and seeking times. Your code only spends a fraction more time setting up those, which is pretty much neglegible over the time spent by the disk, DMA and the appropriate bus controllers.
The putpixel function in comparison was a complete disaster, as the overhead became 10 times as much as the time to pump one pixel to the video card.