需要帮助!无法解决这个问题,我遇到了硬件限制 - 页 21

 
elugovoy:
也许是几毫秒?在基于Windows的操作系统上,以微秒为单位的测量就是做不到......

对不起,你不知道怎么做并不意味着它不可能。

尤里奇使用的代码,即使是在终端。

#import "kernel32.dll"
bool QueryPerformanceCounter(ulong &ticks);
bool QueryPerformanceFrequency(ulong &freq);
#import
//---
void OnStart()
{
   ulong t1, t2, st;
   QueryPerformanceFrequency(st);
   if(st>1000)
   {
      st=(ulong)1 e9/st;
      QueryPerformanceCounter(t1);
      Sleep(20);
      QueryPerformanceCounter(t2);
      Print("Tик таймера=",st," нс. // Sleep(20) = ",(t2-t1)*st," нс.");
   }else Print("Таймер высокого разрешения не поддерживается");
}

http://msdn.microsoft.com/en-us/library/windows/desktop/dn553408

Acquiring high-resolution time stamps (Windows)
Acquiring high-resolution time stamps (Windows)
  • msdn.microsoft.com
QPC is independent of and isn't synchronized to any external time reference. To retrieve time stamps that can be synchronized to an external time reference, such as, Coordinated Universal Time (UTC) for use in high-resolution time-of-day measurements, use GetSystemTimePreciseAsFileTime. Time stamps and time-interval measurements are an...
 
Mikalas:

我不是在低估终端的能力和功能,但

几年前,我需要从一个1.21Gb的文件中提取数据,有21,345,728(!)行。

再试一次。在两年内,MQL4(如果用它做的话)语言已经完全重写,文件操作也完全重写。


根据我提到的 方法,搜索时间为35-45微秒。
究竟是哪种方法?
 
Renat:
再试一次。两年来,MQL4语言(如果是在它上面完成的)已经完全重写,文件工作也完全重写。


究竟是哪种方法?

准备数据的方法。

在我的情况下,它看起来像这样。

 
Mikalas:

准备数据的方法。

在我的情况下,它看起来像这样。

在你的情况下,你只需拿着MT5 x64,把所有的东西一股脑儿地读进内存。然后快速单程扫描到右边的边缘,绘制出偏移量。

在2014年,一个有些大的文件是不会让人害怕的。

 
Renat:

在你的情况下,只要拿着MT5 x64,把所有的东西都一块儿读到内存中。然后快速单程扫描到右边的边缘,绘制出偏移量。

在2014年,一个演出的文件不会吓到任何人。

谢谢,但我没有问题,Komposter有问题。

我以前告诉过你我是怎么解决的(只有一次,不需要了)。

P/S 我甚至无法在档案中找到我的源代码,无法将其交给komposter

作为一个例子。

 
Mikalas:

对不起,你不知道怎么做并不意味着它不可能。

尤里奇使用的代码,即使是在终端。

http://msdn.microsoft.com/en-us/library/windows/desktop/dn553408

谢谢,真的不知道。这些天我要看看这个钟。