This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers Time Light Distance Approximate Light Distance | |
-------------------------- ---- -------------- -------------------------- | |
L1 cache reference 0.5 ns 0.15 m Diagonal across your smartphone | |
Branch mispredict 5 ns 1.5 m Height of Natalie Portman | |
L2 cache reference 7 ns 2.1 m Height of Shaq | |
Mutex lock/unlock 25 ns 7.5 m Height of a school flag pole | |
Main memory reference 100 ns 30 m Half a Manhattan city block (North/South) | |
Compress 1K bytes with Zippy 3,000 ns 900 m Width of Central Park | |
Send 1K bytes over 1 Gbps network 10,000 ns 3,000 m Width of Manhattan | |
Read 4K randomly from SSD* 150,000 ns 45,000 m NYC to Hempstead on Long Island |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Completion menu: completes based on text of current file, as well as other | |
" open buffers/windows. Use <Tab> to open the menu (or pick another key, see | |
" the last line), as well as to cycle between the different options. Use | |
" <Enter> or <Space> to use use option. | |
set complete=.,w,b | |
set completeopt=longest,menu,menuone,preview | |
function! AutoCompleteOnKey(key) | |
if pumvisible() " menu open, loop through choices | |
return "\<Down>" | |
else " menu not open, open conditionally |