TL;DR of very good while long ;) article:
Use a responsive editor (makes the most difference).
* Use a low-latency keyboard, if possible.
* Choose programs that add global keyboard hooks wisely.
* Turn off unnecessary “image enhancers” in you monitor.
* Enable stacking window manager in your OS (e.g. in Windows 7, 8).
TESTED EDITORS RESULTS, Average latency, ms
IDEA-zl 11.9
GVim 19.0
Gedit 23.9
Emacs 44.7
Sublime 52.1
Atom 90.0
Netbeans 119.1
Eclipse 133.6