用于迭代空向量的+3.0微秒 [英] +3.0 microsecond for iterating empty vectors
问题描述
你好我有这个配置文件用于迭代空向量:
+ 0.3us(微秒)在intel pentium 2.4Ghz
可以增加我的延迟应用程序会减少吗?
i意味着接近零延迟,这非常重要。
顺便说一句,
是否有人为此提供了另一个资料?
谢谢。
krbyxtrm写道:你好我有这个配置文件用于迭代空向量:
+ 0.3us(微秒)在intel pentium 2.4Ghz
这可以减少我的应用程序的延迟吗?
我的意思是接近零延迟,这非常重要。
BTW,
有没有人有另一个配置文件?
谢谢。
if(v.size()> 0)
{
//迭代v这里
}
" krbyxtrm" < KR ****** @ gmail.com>在消息中写道
新闻:11 ********************* @ j33g2000cwa.googlegro ups.com ...
:你好我有这个用于迭代空向量的配置文件:
:在英特尔奔腾2.4Ghz上+ 0.3us(微秒)
:
:这可以减少我的申请延迟吗?
:我的意思是接近零延迟,这非常重要。
如果时机非常重要,你应该查看你的std :: vector的
实现。一些当前平台
附带一个支持调试的标准库
默认情况下 - 对所有迭代器进行多次冗余检查
所有迭代器阅读你的文档并找到
如何关闭它(通常使用#define ...)。
你在编译代码吗?内联和
优化?
:顺便说一句,
:有没有人有另外的个人资料呢?
人们很少需要照顾。但实际上它确实是有价值的,是的。
伊万
-
http://ivan.vecerina.com/contact/?subject=NG_POST < - 电子邮件联系表格
Brainbench MVP for C ++<> http://www.brainbench.com
krbyxtrm写道:
你好我有这个配置文件用于迭代空向量:
+ 0.3us(微秒)在intel pentium 2.4Ghz上
你是如何衡量时间的?您可能不小心检测到任务调度程序的
量。
将测试代码放入一个数百万的循环语句中,记录>
挂钟时间,减去和除以获得更好的测量结果。
用于衡量时间的更先进的系统是偏离主题的......
-
Phlip
http://c2.com/cgi/wiki?ZeekLand < - 不是博客!!!
hello i have this profile for iterating empty vectors:
+0.3us (microsecond) on intel pentium 2.4Ghz
can this added delay to my application be reduced?
i mean near zero delay, its very important.
BTW,
does anyone has another profile for this?
thanks.
krbyxtrm wrote:hello i have this profile for iterating empty vectors:
+0.3us (microsecond) on intel pentium 2.4Ghz
can this added delay to my application be reduced?
i mean near zero delay, its very important.
BTW,
does anyone has another profile for this?
thanks.
if (v.size() > 0)
{
// iterate v here
}
"krbyxtrm" <kr******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
: hello i have this profile for iterating empty vectors:
: +0.3us (microsecond) on intel pentium 2.4Ghz
:
: can this added delay to my application be reduced?
: i mean near zero delay, its very important.
If timing is so important, you should look into your
implementation of std::vector. Some current platforms
come with a standard library that is debug-enabled
by default -- making a number of redundant checks on
all iterators, etc. Read your documentation and find
out how to switch this off (usually with a #define...).
Are you compiling your code with inlining and
optimizations on ?
: BTW,
: does anyone has another profile for this?
Rarely do people need to care. But when it actually
makes sense, yes.
Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Brainbench MVP for C++ <> http://www.brainbench.com
krbyxtrm wrote:
hello i have this profile for iterating empty vectors:
+0.3us (microsecond) on intel pentium 2.4Ghz
How did you measure the time? You might have accidentally detected the
quanta of your task scheduler.
Put the test code inside a loop statement that counts to a million, record
wall-clock time, subtract, and divide to get a better measurement.
More advanced systems to measure the time are off-topic...
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
这篇关于用于迭代空向量的+3.0微秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!