Acceleration

In order to offer the best performance, the oser core consists of compiled machine code.

Oser types have pure Python wrappers to support development and allow IDEs to display function signatures and documentation.

To take full advantage of the optimized machine code at run-time, it is advisable to use the oser.accelerator module, which bypasses the Python wrappers.

The expected run-time acceleration is about 35 %, by only changing a single line of code.

import oser  # Use for development; Contains Python wrappers
import oser.accelerator as oser  # Use for deployment; Does NOT contain Python wrappers

class MyDataStructure(oser.ByteStruct):
    def __init__(self):
        super(MyDataStructure, self).__init__()
        self.data = oser.UBInt8()