Pergunta

I'm interested in creating my own programming language and I would like to use python. My question is, would a language written in Python using the PLY library be considerably slower than CPython or would they be about the same in terms of program execution speed? Also in terms of performance how much better would it be if I implemented it in C?

Thanks, Francis

Foi útil?

Solução

If you are implementing a compiler in PLY, the compilation may take longer - but that's irrelevant the execution speed of your program.

For example, you could use PLY to write a C compiler. The compiler may or may not be faster than your other C compiler, but the resulting executable should run at a similar speed (unless you miss a lot of optimisations etc.)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top