Вернуться к статье

Разработка программного модуля для комплексной оценки качества псевдослучайных последовательностей

Optimization and accuracy assurance methods for the statistical tests

Optimization method

Purpose

Technical implementation

64-bit floating-point arithmetic

Accuracy of p-value calculations

Relative error of the critical functions no greater than 10−6 (verified against reference values from Boost.Math)

SIMD vectorization

Acceleration of bit operations when processing large arrays

Vectorization of low-level bit transformations (up to a 4-fold speedup)

ArrayPool and Span<T>

Control of RAM consumption

Renting and reusing buffers; working with memory slices without copying

Memoization and lazy evaluation

Reduction of repeated computations

Caching the results of expensive statistical functions; deferred computation of intermediate results

Edge-case handling

Reliability on non-standard data

Special handling of short and degenerate sequences