4coder»Forums
7 posts
How is it possible for a program to be so fast?

When you type, the input is displayed on the screen instantaneously, without any noticeable delay. Everything is stable and smooth, a good feeling to have when you are writing software. Is this just simple optimization, how do I make my software work as fast as 4coder?

Maybe there are videos that explain this? I've never used a software that was this responsive. I do sincerely wish the developer/developers the best.

Simon Anciaux
1184 posts
How is it possible for a program to be so fast?

I don't think 4coder does anything special for latency.

But there are some think you can do. Have a look a the links in this post.

What you may experience is perceived latency being lower in 4coder because there are no things that are delayed in the rendering (most of the time). For example in some other editors you might have the syntax/semantic highlighting that arrives with a few frames of lag, or the squiggly line under the text when there is an error that take a few frame to be displayed.

Mārtiņš Možeiko
2357 posts / 2 projects
How is it possible for a program to be so fast?
Edited by Mārtiņš Možeiko on

It is written in pretty much same style as games, running "main loop" as fast as you can:

while (running) {
  collect_input();
  update_state();
  render();
}

As long as updating state does not take more than 16msec (on 60Hz) you will be updating output on every frame, meaning you cannot do anything faster that you would be able to see.

Latency on modern OS/GPU is a bit more complex subject, see links I have in post mrmixer liked to.