CS 是计算机科学 (Computer Science) 的缩写,这个 Project 是一个总结,把自己认为和计算机相关的一些东西放进来(主要是和自己工作相关的一些知识),当然也不仅仅只包含计算机的东西。目前更多的关注在:
// 各种访问方式花费的时间
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 100 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 10,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
Read 1 MB sequentially from network 10,000,000 ns
Read 1 MB sequentially from disk 30,000,000 ns
Send packet CA->Netherlands->CA 150,000,000 ns
===
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 10,000 ns 10 us
Send 1 KB bytes over 1 Gbps network 10,000 ns 10 us
Read 4 KB randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
Read 1 MB sequentially from memory 250,000 ns 250 us
Round trip within same datacenter 500,000 ns 500 us
Read 1 MB sequentially from SSD* 1,000,000 ns 1,000 us 1 ms ~1GB/sec SSD, 4X memory
Disk seek 10,000,000 ns 10,000 us 10 ms 20x datacenter roundtrip
Read 1 MB sequentially from 1 Gbps 10,000,000 ns 10,000 us 10 ms 40x memory, 10X SSD
Read 1 MB sequentially from disk 30,000,000 ns 30,000 us 30 ms 120x memory, 30X SSD
Send packet CA->Netherlands->CA 150,000,000 ns 150,000 us 150 ms
Notes
-----
1 ns = 10^-9 seconds
1 us = 10^-6 seconds = 1,000 ns
1 ms = 10^-3 seconds = 1,000 us = 1,000,000 ns
计算机科学是系统性研究信息与计算的理论基础以及它们在计算机系统中如何实现与应用的实用技术的学科;涵盖的内容非常多,但是最核心最基础的学科是计算机科学的基石,包括:
构建个人的知识体系,这些计算机科学的基石是重点,累起来的大厦才够稳固。非常喜欢某个老师的一个比喻,知识体系要建设的像一个倒立的八抓鱼,非常形象,下边的头部和身体是基石,这样就可以伸出很多的触手到不同应用领域。
cs/
- algorithm (Data Structure & Algothrim 数据结构与算法)
- ccp (Computer composition principle 计算机组成原理)
- os (Operating System 操作系统)
- network (Computer Network 计算机网络)
- distributed (Distributed System 分布式系统)
- security (Computer Security 计算机安全)
- database (Database 数据库)
- computing (Parallel Computing & Distributed Computing 并行计算&分布式计算)
- compilation (Compilation Principle 编译原理)
- design (Software Design 软件设计)
- application
- resource/ 资源文件
- img 图片文件