SGI STL (1) :: Use Proper Containers and Algorisms
2016-03-08 13:24
501 查看
Hi guys
My Email: jakezhang1989@hotmail.comMy GitHub Link
Thank you for taking time to go through this post from which you would get what you want.
If you have any problems or opinions that are different form mins, please email me or leave a comments. I will reply as soon as possible.
OK, Let us get started!
what complexity means
If you ignore it, the performance of the resulting program will often render it useless.For example:
Consider the STL vector container. Ignoring the complexity specification, it is possible to implement vector using the same underlying data structure as list, i.e. as a doubly linked list. But for a vector of length 10,000, this would probably slow down an average computation of v[i] by something like a factor of 5,000.
For a program that requires many vector accesses, such as a typical numerical computation, this is likely to change an execution time of minutes to days.
相关文章推荐
- 集训队专题(8)1004 And Now, a Remainder from Our Sponsor
- ZOJ-3923-In the Rain
- “TableDetails”中列“IsPrimaryKey”的值为DBNull.
- 集训队专题(8)1003 Chinese remainder theorem again
- code training
- 70 - Climbing Stairs
- 【leetcode】【172】Factorial Trailing Zeroes
- No Interfaces Available In Wireshark Mac OS X
- MinGW main()
- saiku 展示优化第二步(要诀和技巧)
- saiku 展示优化第二步(要诀和技巧)
- codeforces #345 div.2 B Beautiful Paintings
- Codeforces Round #345 (Div. 2) B. Beautiful Paintings 暴力
- 从Ibatis过渡到Mybatis-比较Mybaits较与Ibatis有哪些方面的改进
- Saiku如何固定查询结果table的表头和首列
- C:CLOSE_WAIT状态的原因与解决方法
- 126.View the Exhibit and examine the data in the PROJ_TASK_DETAILS table.
- RBS创建了“人工”AI聊天系统,叫做Luvo用来处理工作人员的问题
- [LeetCode]70. Climbing Stairs
- AlphaGo对战李世石谁能赢?两万字长文深挖围棋AI技术(一)