|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
翻译原文:This consumption of memory is not the result of the queue's size but is a side effect of the queue's access procedure. (A small yet active queue can easily require more of a machine's memory resources than a large, inactive one.) One solution to this memory space problem might be to move the entries in a queue forward as the leading ones are removed, in the same manner as people waiting to buy theater tickets step forward each time a person has been served. However, this mass movement of data would be very inefficient. What we need is a way of confining the queue to one area of memory without being forced to perform major rearrangements of data.
翻译答案:存储器的消耗问题并不是因队列的大小而生的,其真正原因在于队列的实现问题。(一个小而动态变化的队列比一个大而保持不变的队列需要更多的机器存储资源。)解决存储器空间问题的一个可能方法是:当最前面的条目被移出时,前移队列中的其他条目,就好像人们在购买戏票时所采用的方法一样,每当一个人买到票后,就前移一人。然而这种方法在计算机中运行的效率很低,因为它将需要对数据进行大量的移动。
翻译篇(每次翻译的量都不会很大,全部翻译才有奖励哦)
非计算机方向系列:读完一本书(这是一本经典书籍,里面的每一个单词都值得查阅)
每日一句
You will find that it is necessary to let things go; simply for the reason that they are heavy.
你会明白,放手是必要的——原因很简单,它们太过沉重。 (刮刮乐,挂出大奖)
|
|