News for hackers. Stuff that matters.
Re:Optimizations on Linear Search (2016) by gameswithgo on Saturday October 03, 2020 @12:19PM (#24672991)
>Anything that takes less than 200 ms is perceived to be instantaneous by the human brain

Negative, ghost rider. What is perceived as instant depends on a lot of things, most studies in the past arrived at a threshold of 100ms, but there are domains where 100ms will feel horrible (first person gaming, VR tracking, conversation audio, etc). We know the brain can see things that are visible for only 13ms:

https://news.mit.edu/2014/in-the-blink-of-an-eye-0116

When I am programming if something that doesn't require IO takes even 1ms I immediately take a look and make sure something isn't wrong.

Re:Optimizations on Linear Search (2016) by formerly_proven on Saturday October 03, 2020 @12:21PM (#24672997)
Very true, ~200 ms is a good assumption for the conscious reaction time of an attentive human, but that doesn't mean we perceive time in 200 ms increments and can't tell the delay between "click - 2 ms delay - something happens" and "click - 200 ms delay - something happens". The latter is quite obvious.
Re:Optimizations on Linear Search (2016) by staticassertion on Saturday October 03, 2020 @12:32PM (#24673059)
> even 1ms I immediately take a look and make sure something isn't wrong.

Agreed. I didn't realize this when I was newer to programming, and I think it's in part because I was "thinking in milliseconds".

https://gist.github.com/jboner/2841832

latency.txt was a game changer for me, as well as starting to measure things in terms of nanoseconds.

Side note: is there an updated latency.txt?

Re:Optimizations on Linear Search (2016) by antiuniverse on Saturday October 03, 2020 @04:39PM (#24674519)
You might also enjoy “Memory Bandwidth Napkin Math”:

https://www.forrestthewoods.com/blog/memory-bandwidth-napkin...

Re:Optimizations on Linear Search (2016) by staticassertion on Saturday October 03, 2020 @09:52PM (#24676045)
Thank you, much appreciated.
Re:Optimizations on Linear Search (2016) by formerly_proven on Saturday October 03, 2020 @01:59PM (#24673620)
> Side note: is there an updated latency.txt?

It hasn't changed.