Библиотеки: MathTicker - генератор тиков в математическом режиме - страница 17

Aleksei Kuznetsov #:
Скорость сжатия не стремился увеличить - оставил понятность кода.
Более того - я не против еще замедлить её: во время сжатия, можно включить автоматическую декомпрессию и сравнение распакованных тиков с оригинальными, которая включается параметром bool verify. В тикере есть input для этого.
Aleksei Kuznetsov #:

Странно.

Этот вариант цитировал.
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. 
Experimental features are not production code.

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 компрессия стала в три раза быстрее. Опередив даже самый дешевый вариант декомпрессии.
amrali #:

I did some tests on the new version 3.72.

Добавил.

Обновление v4.0:

  • приложен ускоренный TickCompressor v4.0
  • MathTicker - ускорена работа в одиночном проходе из архива (но все равно медленнее, чем работа из одиночного файла, так как делается пред-распаковка из ZIP в массив и выбор тиков по датам)
    В оптимизации предраспаковка из ZIP выполняется 1 раз в временный файл и все проходы оптимизации работают с той же скоростью, как из одиночного файла