Two points - STL, and multi-threading
来源:互联网 发布:陈鸿一鸣 知乎 编辑:程序博客网 时间:2024/05/01 13:31
* About STL : never trust its performance too much
STL is a standard now. You cannot avoid it ever. People trust it a lot, but keep it in mind: STL is not as good as you think of it. First, you have to know its internal implementation, or you'll make mistakes. As std::map, you can never change its key value because it takes a binary tree as its cardinal structure. Second, it's performance is not that good. Well, this is the issue by design. STL focuses on general issues, so if you have strict perf. constraints in your app, you'd better write your own stuff.
* Multi-threading : sometimes ostrich algorithm is the best solution
If you've got a damn shared data under a multi-threading environment, you may be troubled by it if you have little multi-threading dev. experience. Maybe your first idea is to add locks to the shared data or sth else. But not so long you will be confused by the complex logics of your code. Maybe you'll harvest dead lock, maybe the data is still shared orderlessly. When you got tired, you must be complaining that why there's such shared data?! Yes, the answer is your complaint words: Just remove the shared data~! It's ostrich algorithm, it's too simple to make it an algorithm, but it works. What's the most important: it can save your time a lot~!
- Two points - STL, and multi-threading
- Hibernate and Multi-threading
- Multi-threading
- 多线程与COM (Multi-Threading And COM ---For Delphi )
- 多线程与COM (Multi-Threading And COM ---For Delph
- Java Multi-Threading and Concurrency Interview Questions with Answers
- Some points about postback and multi-language drop down list
- Multi-Threading Competition Series
- Multi-Threading & others
- Multi-Threading Note
- Advanced Java: Multi-threading
- Java Multi-Threading
- 为什么很少有Java程序员精通Multi-threading, Concurrency and Garbage Collection?
- 4-Multi Threading Interview Questions
- Multi-threading programming in Java
- Java concurrency (multi-threading) - Tutorial
- hdu5200 Trees( two points)
- Two Points Revisited
- Sizeof与Strlen的区别与联系
- hibernate的应用逻辑层
- java 根据结果集创建XML文档
- 单多文件上传
- 获取用户窗体信息
- Two points - STL, and multi-threading
- zoj1014 不使用表达式树 ac
- 互联网开放平台技术趋势和讨论
- 想成为最牛程序员吗?以下几点有助你实现这个目标
- 浅谈Soap/Web Service架构及其应用
- 在 winform 中 DataGrid 中实现点击任一单元格都选中当前行
- Strong Name Remove v 2.1.0.0
- 用C#生成足够随机的互不相同的随机数
- 建立一个使用.Net 2.0 MemberShip功能的标准例程——配置篇