从地图中删除3400万__int64需要多长时间? [英] how long should it take to delete 34 million __int64 from a map?
问题描述
我有这个
typedef map< __ int64,int> Results_Map;
__int64被定义为8个字节,范围从-9,223,372,036.854,775,808到
9,223,372,036.854,775,807
我已经加载了大约3400万个哈希键,当程序是
关闭它需要永远(10+分钟)而删除对象。
内存它根据任务经理的使用量从500,000 k变化然后
它下降到9 k然后它又回到40万k而且我刚刚杀死了这个过程中的
。 />
我正在使用stl port btw。我想在stl端口组中询问
一个但是3400万很多而且需要花费这么多时间吗?
有什么方法可以加快速度吗?
谢谢
I have this
typedef map<__int64, int> Results_Map;
__int64 is defined as 8 bytes ranging from -9,223,372,036.854,775,808 to
9,223,372,036.854,775,807
I have loaded it with approx 34 million hash keys and when the program is
shutting down it takes forever (10+ mins) while its deleting the objects.
The memory it uses according to task manager is varies from 500,000 k then
it dropped down to 9 k then it went back up to 400,000k and I just killed
the process.
I''m using stl port btw. I''m looking to ask in the stl port group once I find
one but is 34 million alot and it should take this amount of time?
Is there any way to speed this up?
thanks
推荐答案
>
Whybother写道:
Whybother wrote:
我有这个
typedef map< __ int64,int> Results_Map;
__ int64被定义为8个字节,范围从-9,223,372,036.854,775,808到
9,223,372,036.854,775,807
我已经加载了大约3400万个哈希键,当时该程序正在关闭它需要永远(10多分钟)而删除对象。
它根据任务管理器使用的内存从500,000 k变化然后
它下降到9然后它回到400,000k我刚刚杀了这个过程。
我正在使用stl port btw。我想在stl端口组中询问一旦我找到一个但是有3400万很多并且应该花费这么多时间吗?
有没有办法加速这个?
I have this
typedef map<__int64, int> Results_Map;
__int64 is defined as 8 bytes ranging from -9,223,372,036.854,775,808 to
9,223,372,036.854,775,807
I have loaded it with approx 34 million hash keys and when the program is
shutting down it takes forever (10+ mins) while its deleting the objects.
The memory it uses according to task manager is varies from 500,000 k then
it dropped down to 9 k then it went back up to 400,000k and I just killed
the process.
I''m using stl port btw. I''m looking to ask in the stl port group once I find
one but is 34 million alot and it should take this amount of time?
Is there any way to speed this up?
是的,我希望它需要一段时间。地图必须遍历
3400万个对象并删除它们。
你可能想要一些完全不同的,不是标准的,
容器。你可以通过一些工作在向量内部实现一个映射
,这样的结构可以更快地删除。
Yes, I would expect it to take quite a while. The map has to traverse
34 million objects and delete them.
You probably want some completely different, not in the standard,
container. You can, with some work, implement a map inside of a vector
and such a structure would be quicker to delete by quite a bit.
Whybother写道:
Whybother wrote:
我有这个
typedef map< __ int64,int> Results_Map;
__ int64被定义为8个字节,范围从-9,223,372,036.854,775,808
到9,223,372,036.854,775,807
我已经加载了大约3400万个哈希键,当时
程序正在关闭它需要永远(10多分钟),同时它会删除对象。它根据任务管理器使用的内存是从500,000 k变化然后下降到9 k然后它回到了高达40万k并且我刚刚杀死了这个过程。
>我正在使用stl port btw。我想在stl端口组询问一次
我找到了一个但是3400万很多,它应该花费这么多的时间吗?
有没有办法加速这个?
I have this
typedef map<__int64, int> Results_Map;
__int64 is defined as 8 bytes ranging from -9,223,372,036.854,775,808
to 9,223,372,036.854,775,807
I have loaded it with approx 34 million hash keys and when the
program is shutting down it takes forever (10+ mins) while its
deleting the objects. The memory it uses according to task manager is
varies from 500,000 k then it dropped down to 9 k then it went back
up to 400,000k and I just killed the process.
I''m using stl port btw. I''m looking to ask in the stl port group once
I find one but is 34 million alot and it should take this amount of
time?
Is there any way to speed this up?
打电话''中止''。
V
-
请在邮寄回复时从我的地址中删除资金
Call ''abort''.
V
--
Please remove capital As from my address when replying by mail
< ro ******** **@gmail.com>在消息中写道
news:11 ********************** @ g43g2000cwa.googlegr oups.com ...
<ro**********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Whybother写道:
Whybother wrote:
我有这个
typedef map< __ int64,int> Results_Map;
__ int64被定义为8个字节,范围从-9,223,372,036.854,775,808到
9,223,372,036.854,775,807
我已经加载了大约3400万个哈希键,当时程序是关闭它需要永远(10多分钟)而删除对象。
它根据任务管理器使用的内存从500,000 k
然后
它下降到9 k然后它又回到40万,我刚刚杀了这个过程。
我正在使用stl port btw。我想在stl端口组中询问一次我找到一个但是3400万很多并且应该花费这么多时间吗?
有什么办法吗?加快这个速度?
I have this
typedef map<__int64, int> Results_Map;
__int64 is defined as 8 bytes ranging from -9,223,372,036.854,775,808 to
9,223,372,036.854,775,807
I have loaded it with approx 34 million hash keys and when the program is
shutting down it takes forever (10+ mins) while its deleting the objects.
The memory it uses according to task manager is varies from 500,000 k
then
it dropped down to 9 k then it went back up to 400,000k and I just killed
the process.
I''m using stl port btw. I''m looking to ask in the stl port group once I
find
one but is 34 million alot and it should take this amount of time?
Is there any way to speed this up?
是的,我希望它需要一段时间。地图必须遍历3400万个对象并将其删除。
你可能想要一些完全不同的,而不是标准的
容器。你可以通过一些工作在矢量中实现一个地图
这样的结构可以更快地删除。
Yes, I would expect it to take quite a while. The map has to traverse
34 million objects and delete them.
You probably want some completely different, not in the standard,
container. You can, with some work, implement a map inside of a vector
and such a structure would be quicker to delete by quite a bit.
你在说一个矢量组成的矢量地图元素?矢量<映射< INT,INT>>或者
什么?你可以扩展吗?
谢谢
are you talking a vector consisting of map elements? vector<map<int,int>> or
something? can you expand upon that?
thanks
这篇关于从地图中删除3400万__int64需要多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!