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 (~2012) | |
| ---------------------------------- | |
| 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 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
| package phoneNumberLMove; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Queue; | |
| /** |
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
| Github Gist:有版本控制的粘帖代码服务 | |
| 作者 Werner Schuster 译者 郭晓刚 发布于 2008年7月26日 | |
| 领域 过程 & 实践, 语言 & 开发 主题 github , git , Ruby , 协作技术 , 动态语言 , 配置管理 , 协作 , 源代码 , 团队工作 , 敏捷 | |
| 新浪微博 腾讯微博 豆瓣网 Twitter Facebook linkedin 邮件分享 更多 0 | |
| Github刚刚增加了一项服务——Gist,并且在RubyFringe大会上作了演示。Gist是一个粘帖工具,与Pastie类似。通过粘帖工具可以方便地共享文本或者代码——用户把一段文本粘帖到网站上就会得到一个URL,通过这个URL就可以访问先前粘帖的文本。 | |
| Gist与Pastie的原理是一样的,只不过它还有一样绝招:粘帖的文本会被放进一个git仓库,仓库可以通过一个git 克隆URL访问,还可以用git客户端程序检出。不仅如此,联系还是双向的:将提交送回到仓库,新作的修改(以及新增的文件)就可以在Gist的Web界 面上访问到,在Web界面上同样可以编辑文本文件。使用Gist,用户可以从粘帖一小段文本或者代码开始,然后通过Web界面或者git工具展开网上的协 作。 | |
| Bryan Liles制作了一段截屏录像来演示Gist的工作流程和功能。录像中演示了如何粘帖代码片段,然后用git命令行通过Gist生成的git克隆URL访问粘帖的代码,最后把修改后的版本推送回去。 |
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
| Question: | |
| I've got a nested loop construct like this: | |
| for (Type type : types) { | |
| for (Type t : types2) { | |
| if (some condition) { | |
| // Do something and break... | |
| break; // Breaks out of the inner loop | |
| } | |
| } |