If you profile it you can see that most of the time is spent on the sp_factor_ratio and mul! functions. You can’t probably do much about mul!, so probably you want to invest in improving the first one:
That was built with the VSCode extension: Julia VS Code extension version v0.17 released
