Aleksei Kuznetsov #: Скорость сжатия не стремился увеличить - оставил понятность кода.
Более того - я не против еще замедлить её: во время сжатия, можно включить автоматическую декомпрессию и сравнение распакованных тиков с оригинальными, которая включается параметром bool verify. В тикере есть input для этого.
Aleksey Kuznetsov # : I didn't aim to increase compression speed, keeping the code understandable. Furthermore, we'll be using compression very rarely,
What I did is just a simple re-arrangement of the compressor function. You put the switch..case construct inside the compression for loop, thus slowing the loop.
I hoisted it outside the for loop, so maximizing it's throughout.
I agree with you that compression speed is not really that important as in your usage cases.
Also, trading a small loss in decompression performance for the sake of price accuracy is a perfect decision. I don't even mind using NormalizeDouble(), as long as the output matches what users would expect.
Improving performance while losing the intended functionality is not the wise decision.
amrali #: What I did is just a simple re-arrangement of the compressor function. You put the switch..case construct inside the compression for loop, thus slowing the loop.
I hoisted it outside the for loop, so maximizing it's throughout.
После этой правки на EURUSD компрессия стала в три раза быстрее. Опередив даже самый дешевый вариант декомпрессии.
MathTicker - ускорена работа в одиночном проходе из архива (но все равно медленнее, чем работа из одиночного файла, так как делается пред-распаковка из ZIP в массив и выбор тиков по датам) В оптимизации предраспаковка из ZIP выполняется 1 раз в временный файл и все проходы оптимизации работают с той же скоростью, как из одиночного файла
Для авторизации и пользования сайтом MQL5.com необходимо разрешить использование файлов Сookie.
Пожалуйста, включите в вашем браузере данную настройку, иначе вы не сможете авторизоваться.
Вы вошли в аккаунт. Двухфакторная аутентификация отключена. Настройте её заново и отсканируйте новый QR-код или продолжите с отключённой двухфакторной аутентификацией.
Скорость сжатия не стремился увеличить - оставил понятность кода.
Странно.
I didn't aim to increase compression speed, keeping the code understandable. Furthermore, we'll be using compression very rarely,
What I did is just a simple re-arrangement of the compressor function. You put the switch..case construct inside the compression for loop, thus slowing the loop.
I did some tests on the new version 3.72.
Обновление v4.0:
В оптимизации предраспаковка из ZIP выполняется 1 раз в временный файл и все проходы оптимизации работают с той же скоростью, как из одиночного файла