chapter_computational_complexity/performance_evaluation/ #11
Replies: 42 comments 20 replies
-
运行"地"快,是不是有错别字? |
Beta Was this translation helpful? Give feedback.
-
|
有个小建议: |
Beta Was this translation helpful? Give feedback.
-
|
这一句“复杂度分析评估的是算法运行效率随着输入数据量增多时的增长趋势。” 貌似可以润色成 “复杂度分析旨在评估随着输入数据量增加,算法运行效率所呈现的增长趋势。” ? |
Beta Was this translation helpful? Give feedback.
-
|
“它描述了随着输入数据大小的增加,算法执行所需时间和空间的增长趋势”这个定义虽然抽象,但也挺好理解。 前面说过“随着输入数据量的变化,算法会表现出不同的效率”。 也就是说,数据量是「算法执行效率」的重要影响因素。 而时间和空间又是我们重要的消费资源。 把数据量看做 x 值,算法计算 x 值所需时间或空间当做 y 值。 计算出来的数据,就是一个横坐标的点(x,y)。 把不同的点,连接起来,就会是一条曲线。 不同的算法,就会有属于自己的不同“曲线”。 通过观察这条曲线的“陡峭”程度,也就是时间或空间增长的“快慢”,从而评价这个算法的性能。 |
Beta Was this translation helpful? Give feedback.
-
哈哈, 确实感到些许困惑, 可能这就是理论知识让人略感抽象 |
Beta Was this translation helpful? Give feedback.
-
|
Day 1 : LGT 总结 :理论估算不同的算法 最后我们都可以用(x,y)抛物线的形式来表示,不同的算法,随着数据量的增加(x改变),那么时间或者空间也可能发生改变(y改变) |
Beta Was this translation helpful? Give feedback.
-
|
我连复杂度都看不懂,咋搞 |
Beta Was this translation helpful? Give feedback.
-
|
嗯,老板 |
Beta Was this translation helpful? Give feedback.
-
|
太强啦! |
Beta Was this translation helpful? Give feedback.
-
|
太赞了 |
Beta Was this translation helpful? Give feedback.
-
|
Completed |
Beta Was this translation helpful? Give feedback.
-
|
‧ 时间效率:算法运行速度的快慢。 ‧ 时间效率:算法运行的计算次数。 |
Beta Was this translation helpful? Give feedback.
-
|
我的智商都看得懂 |
Beta Was this translation helpful? Give feedback.
-
|
抛去拗口的概念,采取两种方式实现同一个功能,但是不知道它们的优劣,直接为了这么小的功能进行测试(甚至是整个系统的测试),一是不切实际(资源有限),二是未必能屏蔽所有干扰(环境完全一致)。也因此考虑用复杂度来衡量,估算“时间”和“空间”各自的开销,是一种完全从代码层面(嵌套循环/所用内存多少)就可以估算的指标。 |
Beta Was this translation helpful? Give feedback.
-
|
下面有一个关于时间效率的讨论,作者认为:“时间效率”整体上指的就是算法在“时间”上的快慢,而非运行计算次数。还有人则说: 时间效率指算法运行的计算次数。 |
Beta Was this translation helpful? Give feedback.
-
|
day02 |
Beta Was this translation helpful? Give feedback.
-
day1 |
Beta Was this translation helpful? Give feedback.
-
|
实际上 2C的项目基本上都是空间换时间。甚至上超大规模的分布式系统。 |
Beta Was this translation helpful? Give feedback.
-
|
写跑在开发板上 树莓派这种卡片电脑时, 才能体会到 空间复杂度的重要。 |
Beta Was this translation helpful? Give feedback.
-
|
打卡 |
Beta Was this translation helpful? Give feedback.
-
大家用电脑登着看的还是一边电脑跑代码一边平板看教材 |
Beta Was this translation helpful? Give feedback.
-
|
对复杂度一知半解,不会求 |
Beta Was this translation helpful? Give feedback.
-
|
打卡 |
Beta Was this translation helpful? Give feedback.
-
|
打卡 |
Beta Was this translation helpful? Give feedback.
-
|
建议给出简单例子说明复杂度 |
Beta Was this translation helpful? Give feedback.
-
|
看到作者对 “实际测试” 和 “理论估算” 的两种方式展开了讨论和分析,这里也有一些自己的感悟。 所谓的实际测试我们有的时候很难去在项目/工程刚刚开始的时候就实现落地,反而理论估算是更加符合在当下软件开发的场景。 举个例子,比如瀑布模型,虽然我们当前不推荐这样的开发模型进行落地,但是它会给我们一些指导建议——我们在开发完成一个工程之前是没有办法看到它的整体完整的一个模型的。 所以这样的话,理论估算是更加重要的,我们可以在工程初期或者是实施阶段,对我们做的东西进行整体上的预估和评价,这样会极大的提高我们对整体上的把握,和降低工程所带来的成本消耗。 所以,我们学习数据结构与算法的本质就是更好的分析和处理,在这个理论阶段进行估算。 当然,算法的本质并不是在实际测试没有任何作用的,而是一个相辅相成的作用,当我们在前期对工程的实现和落地有一个整体的把控之后,对于之后的实际测试也就是一个水到渠成的事情了。 分享链接 |
Beta Was this translation helpful? Give feedback.
-
|
好的算法能够在时间和空间复杂度上做到好的平衡,既能够快速出结果,又不会占太大的空间,又快又小是算法设计的根本目的。 |
Beta Was this translation helpful? Give feedback.
-
|
2.1打卡 |
Beta Was this translation helpful? Give feedback.
-
|
复杂度分析衡量的就是dy/dx |
Beta Was this translation helpful? Give feedback.
-
|
感觉渐进分析的名字来源于,对大的数据的分析从而取近似值的操作 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
chapter_computational_complexity/performance_evaluation/
Your first book to learn Data Structure And Algorithm.
https://www.hello-algo.com/chapter_computational_complexity/performance_evaluation/
Beta Was this translation helpful? Give feedback.
All reactions