Why do you think people are writing toy programming languages?
It's a learning exercise. Sure, if you want to learn to use yacc, or whatever, use yacc. I don't think time efficiency is a useful metric when the overwhelming majority of people is this space aren't doing it for their job, or even because they 'need' to create a new language.
Ultimately you could just use python, it'll be faster and more fully featured.