Here it might be worth interleaving the two dependency chains by adding ag2 and rb2 as separate variables. Again likely to be a single digit speedup.