On 2011-02-09, at 9:03 AM, Oleg Parashchenko wrote:
Hello Marc,
On Tue, 8 Feb 2011 09:53:31 -0500 Marc Feeley feeley@iro.umontreal.ca wrote:
...
Do you still want to generate PHP? Is the choice of PHP important or do you want any portable virtual machine?
My big plan is to code a library for developers and sell it. Instead of using a traditional programming language, I'd like to program in a pseudocode (by coincide, it is Scheme R5RS) and generate versions for many platforms: c, java, .net etc. And the main platform is conventional PHP.
PHP is a rather slow VM.
Yes. But at least I hope that Scheme-to-PHP converted code will be not much slower than an equivalent native PHP code.
If performance is important then I would suggest that you test performance manually, i.e. you compile a Scheme program "by hand" to PHP roughly how Gambit-PHP would do it, and check performance against a program directly coded in PHP. It would be unfortunate if you spent a lot of time developing a PHP back-end for Gambit to discover in the end that the performance is not good enough for your application. My intuition tells me that the code generated by Gambit-PHP will be at best an order of magnitude slower than pure PHP.
Marc