I'm currently hashing this out in the Undine project as an issue too #2278447: Dynamically scale Vagrant resource allocation based on host's resources.

Basically I found this article while trying to optimize my own Vagrant VM for the project I maintain (elmsln) -- http://www.stefanwrobel.com/how-to-make-vagrant-performance-not-suck

It attempts to look at the host environment running the VM and dynamically allocate resources based on a formula that he describes in the posting. Not sure if anything like that is going on in the vagrant VM files as I don't structure mine the way this project does but worth at least mentioning. I saw dramatic performance improvements on my MBP after using this approach instead of hard-coding the resources to use.