Suivre
1
0
Forker
Vous avez déjà forké MQLArticles
0
MQLArticles/Utils/FA/String/Misce.mq5

45 lignes
1,5 Kio
MQL5
BrutLien permanentVue normaleHistorique

2026-03-26 18:15:47 -05:00
//+------------------------------------------------------------------+
//| Misce.mq5 |
//| Copyright 2026, Niquel Mendoza. |
2026-03-26 18:15:47 -05:00
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2026, Niquel Mendoza."
2026-03-26 18:15:47 -05:00
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
#include "Conv.mqh"
2026-03-26 18:15:47 -05:00
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
double v;
ulong a = GetMicrosecondCount();
for(int i = 1; i < (1 << 30); i += 1000)
{
const string str = string(i) + ".1651";
int pos = 0;
TSN::CStringConvert::ToValue(str, pos, v, StringLen(str));
}
ulong b = GetMicrosecondCount();
Print("@: ", (b - a), " ch: ", v);
a = GetMicrosecondCount();
for(int i = 1; i < (1 << 30); i += 1000)
{
const string str = string(i) + ".1651";
v = StringToDouble(str);
}
b = GetMicrosecondCount();
Print("native: ", (b - a), " ch: ", v);
2026-03-26 18:15:47 -05:00
}
//+------------------------------------------------------------------+