respy
                                
                                 respy copied to clipboard
                                
                                    respy copied to clipboard
                            
                            
                            
                        Dynamically write specialized state space functions.
- Date you used respy: 29.07.2019
- respy version used, if any: > 1.2.1
- Python version, if any: 3.7
- Operating System: any
Current State
respy currently has a very flexible _create_state_space function which can scale to any number of choices with experiences and wages, types and choices without experience and without wages. Soon, it will also include observed variables which enter the state space. The only problem is that the function is slow. The setup cost is mostly incurred only once, but it takes 66s for Keane1997.
Proposal
The former jitted functions are a lot faster. It takes only 13s for KW1997. But, they are inflexible.
Thus, the task is to write a function which writes specialized Numba functions similar to the function in respy.tests._former_code when a solution is requested based on everything contained in options and params. The resulting create_state_space function will then be imported and executed to get the state space and indexer.
The runtime for creating a state space significantly dropped due to #310. Still valid, but less urgent.
Probably wait until Numba supports yield from and then jit the whole thing.