I see the problem but wonder if there might be a better solution. In particular, as I understand Lua,  execution of a program basically consists of two parts:<div>1) Loading. By this I mean reading the .lua file from disk and precompiling via luac into bytecode.</div>
<div>2) Executing. By this I mean running the bytecode in the host's luac virtual machine.</div><div><br></div><div>Step 2 is exactly the same speed for both lua and luac files. So the only speed difference is the overhead involved in Step 1.</div>
<div><br></div><div>We've seen that while standard Lua might produce identical luac files across 32-bit architectures, and perhaps across 64-bit as well, the luac files differ between 32 and 64 bit. It also seems clear to me that Lua (because it doesn't offer the ability to create 32-bit luac files using the 64-bit precompiler) is intended to be used on the host system and isn't well designed for cross-compiling.</div>
<div><br></div><div>One solution is to fork Lua.</div><div><br></div><div>Another, it seems to me, is to load *time critical* lua files when VLC starts. These could be placed in a special lua/init directory. By performing Step #1 above during VLC startup, the speed issues noted by Rémi disappear.</div>
<div><br></div><div>I think it's tremendously advantageous to distribute lua files rather than luac files. For one, it encourages people to write their own, and to make minor local modifications where necessary. Neither is feasible with luac files.</div>
<div><br></div><div>For another, it avoids the problem of either forking Lua or waiting for upstream to make fixes.</div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Feb 15, 2012 at 9:52 AM,  <span dir="ltr"><<a href="mailto:vlc-devel-request@videolan.org">vlc-devel-request@videolan.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Message: 3<br>
Date: Wed, 15 Feb 2012 09:12:40 +0100<br>
From: R?mi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>><br>
To: Mailing list for VLC media player developers<br>
        <<a href="mailto:vlc-devel@videolan.org">vlc-devel@videolan.org</a>><br>
Subject: Re: [vlc-devel] [PATCH] LUA: precompile with luac<br>
Message-ID: <<a href="mailto:482b6b20d03fac50f58e2c9ef0b47fc0@chewa.net">482b6b20d03fac50f58e2c9ef0b47fc0@chewa.net</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Tue, 14 Feb 2012 12:14:37 -0500, Rafa?l Carr? <<a href="mailto:funman@videolan.org">funman@videolan.org</a>><br>
wrote:<br>
> Le 2012-02-14 03:27, R?mi Denis-Courmont a ?crit :<br>
>> On Mon, 13 Feb 2012 21:39:24 -0500, Rafa?l Carr?<br>
>> <<a href="mailto:rafael.carre@gmail.com">rafael.carre@gmail.com</a>><br>
>> wrote:<br>
>>> Le 2010-02-14 14:09, R?mi Denis-Courmont a ?crit :<br>
>>>> ---<br>
>>>>  share/Makefile.am |   64<br>
>>>>  +++++++++++++++++++++++++++++++++++++++++++++++-----<br>
>>>>  1 files changed, 57 insertions(+), 7 deletions(-)<br>
>>><br>
>>> Do we need this at all?<br>
>><br>
>> Yes.<br>
><br>
> Why?<br>
<br>
Because it is faster.<br>
<br>
--<br>
R?mi Denis-Courmont<br>
<a href="http://www.remlab.net/" target="_blank">http://www.remlab.net/</a><br>
<br><br></blockquote></div></div>