LLVM: XojoScript vs. Xojo?

It seems to me that, at one point, XojoScript was actually faster than Xojo code for certain tasks; for example, I remember comments that some functions were up considerably using XojoScript because it was compiled using the new LLVM system.

Is this still true? Are there scenarios for and against using XojoScript when seeking optimal performance? For reference, my task involves lots of repetitive floating point operations.

Thanks!

[quote=201517:@Eric Williams]It seems to me that, at one point, XojoScript was actually faster than Xojo code for certain tasks; for example, I remember comments that some functions were up considerably using XojoScript because it was compiled using the new LLVM system.

Is this still true? Are there scenarios for and against using XojoScript when seeking optimal performance? For reference, my task involves lots of repetitive floating point operations.![/quote]

Just run a few execution time measurements between regular code and XojoScript. The difference is usually huge.

I did, and they were frankly almost unbelievable. That’s why I’m verifying my assumptions, before diving in and converting a huge chunk of tweaky code over to a difficult-to-debug language. :slight_smile:

XojoScript uses the LLVM compiler. Xojo does not - yet. As they roll out support for 64-bit compiling, it will use LLVM and will likely close the gap. Of course, that will depend on the level of optimization that is enabled and/or selected when you compile. Look for improved speed of your Xojo code over the next year or so. It will likely get better over time as more optimization options are supported.

With respect to existing 32-bit Xojo projects, I would not change too quickly because I expect intensive testing will be necessary. It’s a big step which is going to be taken.

Eric:

if you need speed improvements RIGHT NOW, go ahead.

On the other hand, do not assume the future will be tomorrow. Read what it was in the past and act accordingly.

When I was working at Apple France, some people sometimes ask me about new products (release dates, new features) and my answer were always:

you need a new computer right now ?
do not wait, buy it and be happy.
(instead of loosing your time with your slow machine / waiting an unknow amount of months for a faster one)

[Else, start to put money in your large pig until a brand new PowerBook comes to life]

Of course, I started to tell them that I do not have any right to gave them secret informations.

Keep in mind that XojoScript doesn’t support passing objects back and forth with your compiled Xojo code, so you’ll need to serialize that kind of data somehow.

Also, remember to factor in compile time. Simple scripts may be instantaneous, but larger, mor complex scripts may not. If your script doesn’t have to change between runs, make sure you precompile it.