Divide and Conquer (solve one endogenous state models faster)

That’s cool! Look forward to using this new feature!

I was playing around with a simple life-cycle model with the following structure

  • No d variable
  • One endogenous state, a
  • One exogenous stochastic state, z, age-dependent
  • Permanent type, theta (income fixed effect)

I tested divide and conquer but it is roughly 4 times slower than the standard method. This holds for different grid sizes n_a (from 500 to 1500 points) and for different options level1n (from 7 to 21). I was a bit puzzled. Here is my example on github:

IntroToLifeCycleModels/ALE/main.m at main · aledinola/IntroToLifeCycleModels · GitHub

EDIT
The only slightly non-standard feature is that I have only two grid points for z (since I took the example from one of yours where you had only employed vs unemployed). Divide and conquer should be still beneficial though :thinking:

Will look at this, but probably not until January (might fit it into early Dec)

I am not too surprised it is slower with n_a=500 and n_z=2 (gpus are just so good at parallelization that dividing it up is probably just not worthwhile), I am surprised it is still slower with n_a=1500 and n_z=2.

1 Like

Great, thanks! If find out something in the meantime, I’ll let you know