10的力量:人类与机器的时间感

人类

0.1 second is the response time limit if you want users to feel like their actions are directly causing something to happen on the screen.

For Web usability, this means that new pages must display within 1 second for users to feel like they're navigating freely; any slower and they feel held back by the computer and don't click as readily.

More than 10 seconds, and you break the flow. Users will often leave the site rather than trying to regain the groove once they've started thinking about other things.

Users should be able to complete simple tasks in about 1 minute. Awkward sites that require much more than a minute for basic tasks — such as transferring money from a savings to a checking account — will be abandoned.

Likewise, most Internet videos should last no more than 1–2 minutes because people don't like passively watching something for much longer than that while they're in the active frame of mind induced by Web surfing.

People complete most Web tasks in less than an hour. In one study, 1/2 of e-commerce purchases occurred within 28 minutes of the user's arrival at the website.

1 day is the maximum turnaround for customer service requests, although you should send transactional email and confirmation messages within 1 minute to keep users from wondering whether their action — such as a purchase or address change — has been received correctly.

Tasks that require extensive research or big decisions often stretch across a week or more, as users gradually progress in their thinking.

Business processes often take even more time than individual decisions because of the need to get various people on the same page. For both B2B sites and enterprise collaboration, it's common to have a month or more pass between the initial action and the completion of that workflow.

Data often lives for decades — far longer than any individual user interface that people use to access the data. This means that you need migration tools to help users make sense of old data and transfer it into new systems.

机器

Google的工程师Jeff Dean告诉你,在机器的世界里,时间维度上看:

  • L1 cache reference: 0.5 ns
  • Branch mispredict: 5 ns
  • L2 cache reference: 7 ns, 14倍 L1 cache
  • Mutex lock/unlock: 25 ns

  • Main memory reference: 100 ns, 20倍 L2 cache, 200倍 L1 cache

  • Compress 1K bytes with Zippy: 3,000 ns

  • Send 1K bytes over 1 Gbps network: 10,000 ns = 0.01 ms

  • Read 4K randomly from SSD: 150,000 ns = 0.15 ms
  • Read 1 MB sequentially from memory: 250,000 ns = 0.25 ms
  • Round trip within same datacenter: 500,000 ns = 0.5 ms
  • Read 1 MB sequentially from SSD: 1,000,000 ns = 1 ms, 4倍 memory

  • Disk seek: 10,000,000 ns = 10 ms, 20倍 datacenter roundtrip

  • Read 1 MB sequentially from disk: 20,000,000 ns = 20 ms, 80倍 memory, 20倍 SSD

  • Send packet CA->Netherlands->CA: 150,000,000 ns = 150 ms

参考