Traditional Methods to Achieve Performance
Developing accurate repetitive calculations such as Monte-Carlo simulations using traditional Object-Oriented languages requires use of multithreading and/or vectorisation. These are tricky to implement and can lead to intermittent issues and hard-to-maintain code.
Automatic Adjoint Differentiation (AAD) produces accurate sensitivities but is perceived as hard to implement and cannot be used to accelerate scenario analysis.
Traditional AAD tools use tape to record and replay calculations. MatLogica's AADC generates machine code (executable on a CPU) at runtime, and far exceeds performance of tape-based tools.
How is MatLogica Unique?
MatLogica’s easy-to-integrate JIT compiler converts user code (C++ or Python) into vectorized and multi-thread enabled, NUMA-aware machine code ('kernel') with the minimal number of operations theoretically necessary to complete the task.
By generating the kernel at runtime, we can take advantage of the information available during program execution and build in additional optimisations.
Our state-of-the-art code compression mechanism allows compression of the optimised machine code, leading to better cache utilization.
Accordingly, far fewer operations are loaded onto the CPU, extracting the maximal speed-up - something other libraries fail to achieve.
MatLogica’s AADC library additionally computes the reverse accumulation equations directly in the machine code (other libraries use tape), resulting in a far better performance than the alternative approaches.
Our tests show that AADC calculates both the original function and derivatives faster than the original code calculates the function alone, often by a factor of 6-100. This is achieved with minimal changes to the original code since Matlogica’s compiler does virtually all the work.