Wednesday 16 November 2011

What is the fastest way to write text to the screen? in C programming

What is the fastest way to write text to the screen?

Usually, you are not overly concerned with the speed with which your program writes to the screen. In some applications, however, you need to be able to write to the screen as quickly as possible. Such programs might include these:

Text editors. If you cannot draw to the screen very quickly, scrolling of the screen due to the user
entering text, as well as other actions, might be too slow.

 Animated text. It is common to print characters quickly over the same area to achieve animation. If
you cannot print text to the screen very quickly, this animation will be too slow and will not look very
good.

Monitor programs. Such a program might continually monitor the system, another program, or some hardware device. It might need to print status updates to the screen many times a second. It is quite possible that the printing to the screen allowed by the standard C library might be too slow for such a program.

What are you to do in such a case? There are three ways you might try to increase the speed with which your program writes to the screen: by choosing print functions with a lower overhead, by using a package or library with faster print features, and by bypassing the operating system and writing directly to the screen. These methods will be examined from the least involved solution to the most complex.



No comments:

Post a Comment