APrioriInvestments / typed_python

An llvm-based framework for generating and calling into high-performance native code from Python.
Apache License 2.0
197 stars 8 forks source link

Add function complexities and intermediates to cache #442

Open wllgrnt opened 1 year ago

wllgrnt commented 1 year ago

NB: depends on #440.

Motivation and Context

In order to inline cached functions we must store the native and llvm layer intermediates, along with the complexities. This will reduce cache load time but should increase compiled function speed and predictability.

Approach

The optimal approach would be to regenerate the necessary intermediates from the information given at the native layer, but as it stands i don't think we don't have enough information to do so. So instead we track the necessary intermediates in the BinarySharedObject which gets read/written to disk.

How Has This Been Tested?

full pytest suite, debugging statements (now removed) to ensure the correct codepath is hit.

Types of changes

Checklist: