4 ms·
I am curious how hn would construct a program which tried to minimize the latency of "simplest" test possible. Lets say -- press the space bar and the pixel at
by sagebird 8y ago
I am curious how hn would construct a program which tried to minimize the latency of "simplest" test possible. Lets say -- press the space bar and the pixel at top right of screen turns green.
I used to use nasm on a dos machine - where it was possible to write a rather straightforward assembly program that would take a keypress and update a pixel -- but I am not sure how abstract/layered graphics stacks are on operating systems these days -- IE -- what is the simplest/low latency method to tell a computer to flip an pixel? SDL?
- nickjj 8y agoA few months ago I asked the MS devs why their default WSL terminal felt incredibly responsive and they replied with a ton of details. You can read the thread here: https://github.com/Microsoft/console/issues/327 https://github.com/Microsoft/console/issues/327
- cschep 8y agoWow this is really wonderful! Thanks for spawning that thread into existence and posting it here :)
- deleted 8y ago[deleted]
- Dahoon 8y agoWhile the reply is great I feel it is missing the point a bit. The reason it feels so fast is IMO because everything else is so slow. Look at the numbers in below link (near the bottom). Windows 10 is extremely slow. Linux is often twice as fast with the same hardware and the same software. Why they still haven't fixed it is beyond me. EDIT. Doh, forgot the link. http://isitsnappy.com/ http://isitsnappy.com/
- nickjj 8y ago> Linux is often twice as fast with the same hardware and the same software. Why they still haven't fixed it is beyond me. Linux is no different. Gnome terminal has a ton of input latency compared to xterm. It's like night and day. A lot of graphical apps in Linux have added input latency just like Windows. It's due to layers of UI abstractions and frameworks (the same as Windows but different UI toolkits of course). That links just shows that VSCode and Atom are both horrendously bad for input latency on any OS.
- 1996 8y agoDid you try msys2 mintty? https://github.com/msys2/msys2/wiki/Using-packages https://github.com/msys2/msys2/wiki/Using-packages
- nickjj 8y agoI personally use wsltty (based on mintty). It's noticeably worse than ubuntu.exe in terms of input latency but has better features for screencasts (ie. hotkeys to adjust font sizes). Last week they released a version that supposedly removes 30ms of latency which sounds very promising, but the author didn't create a Windows installer for it yet.
- 1996 8y agoThanks! With msys2, pacman -Syu then pacman -Su will update your minty to 2.9.9, which according to https://github.com/mintty/wsltty/issues/145 https://github.com/mintty/wsltty/issues/145 should include the 30 ms patch. It feels quite smooth to me, but I haven't done measurements
- zokier 8y agohttps://www.blurbusters.com/blur-busters-lagless-raster-follower-algorithm-for-emulator-developers/ https://www.blurbusters.com/blur-busters-lagless-raster-foll... is pretty good starting point. The whole website is dedicated to low latency and high refresh rate graphics, with plenty of indepth information. As far as I can tell, PCs should be capable of single-digit millisecond end-to-end latencies with the right hardware (display and input devices) as long as you can afford to burn cpu cycles on your drawing routine.