Ray's playground

 

2011年9月30日

Item 16:Remember the 80-20 rule.(More Effective C++)

摘要: The 80-20 rule states that 80 percent of a program's resources are used by about 20 percent of the code: 80 percent of the runtime is spent in approximately 20 percent of the code; 80 percent of the memory is used by some 20 percent of the code; 80 percent of the disk accesses are performed for. 阅读全文

posted @ 2011-09-30 13:03 Ray Z 阅读(368) 评论(0) 推荐(0)

Item 15:Understand the costs of exception handling.(More Effective C++)

摘要: The prudent course of action is to be aware of the costs described in this item, but not to take the numbers very seriously. Whatever the cost of exception handling, you don't want to pay any more than you have to. To minimize your exception-related costs, compile without support for exceptions 阅读全文

posted @ 2011-09-30 11:57 Ray Z 阅读(198) 评论(0) 推荐(0)

Item 14:Use exception specifications judiciously.(More Effective C++)

摘要: It's important to keep a balanced view of exception specifications. They provide excellent documentation on the kinds of exceptions a function is expected to throw, and for situations in which violating an exception specification is so dire as to justify immediate program termination, they offe. 阅读全文

posted @ 2011-09-30 11:41 Ray Z 阅读(259) 评论(0) 推荐(0)

导航