//+------------------------------------------------------------------+ //| Test.mq5 | //| Copyright 2026, Niquel Mendoza. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, Niquel Mendoza." #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #include "Conv.mqh" //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- long v; ulong a = GetMicrosecondCount(); for(int i = 1; i < (1 << 30); i += 1000) { const string str = string(i); int pos = 0; TSN::CStringConvert::ToValueNUnsigned(str, pos, v, StringLen(str)); } ulong b = GetMicrosecondCount(); Print("tsn: ", (b - a), " ch: ", v); a = GetMicrosecondCount(); for(int i = 1; i < (1 << 30); i += 1000) { const string str = string(i); v = StringToInteger(str); } b = GetMicrosecondCount(); Print("native: ", (b - a), " ch: ", v); } //+------------------------------------------------------------------+