Large Cmdstan performance differences Windows vs. Linux

Actually, I procrastinated a bit and found the solution (well, at least it looks promising).

WSL (Windows Subsystem for Linux) https://docs.microsoft.com/en-us/windows/wsl/install-win10
Its available in the Microsoft store. Easy to install, took me 5 minutes, no hiccups.

Had to install make and g++ with
sudo apt install make g++

No mingw32-make, no TBB path stuff, just works! Sweet. You can edit all files normally. C: is under /mnt/c

And the times for your model @andrjohns :
Native Windows + RTools 4.0: 400s
WSL: 140s !!

I would encourage anyone running Windows that use cmdstan, cmdstanpy or run rstan or cmdstanr via the console to try it out. Easy to try & doesnt break anything.

Rstudio doesnt work with WSL directly yet, but you can start a rstudio cloud in WSL and use it with the browser. Though that sounds a bit too meta for my blood: https://medium.com/lead-and-paper/how-to-use-rstudio-server-for-ubuntu-on-windows-10-a7aeee661a5d

There is also WSL2 that needs a latest build of Win10 that also runs GPUs and all.

8 Likes