On Thu, Jun 13, 2013 at 10:35 PM, Bram Moolenaar <[email protected]> wrote: > > Hiroshi Shirosaki wrote: > >> Recently some vim plugins use if_lua for performance issues because >> Vim script is not so fast. For example Shougo's neocomplete.vim[1] >> shows better performance thanks to if_lua. >> >> According to some benchmark results LuaJIT looks much faster than Lua >> and is fully compatible to Lua 5.1.[2][3] >> So that we would get more performance advantage by using LuaJIT >> instead of Lua. >> >> On Windows just replacing Lua's dll with LuaJIT's dll in Vim directory >> seems to work as expected without rebuilding vim in the case of >> dynamic link. Now LuaJIT bundled vim binary for Windows is distributed >> by kaoriya.[4] > > Does this require renaming the .dll, thus afterwards you may forget that > the file is actually the JIT one? >
Maybe yes. But now I can confirm which dll is linked by running a benchmark script since performance is 10x different. >> However linking vim with LuaJIT on Unix like OS requires some works in >> configure and build process because library names and directory path >> of LuaJIT are slightly different from Lua. And LuaJIT requires special >> link options on Mac OS X. It might not easy for beginners. >> >> It would be nice if configure would prepare for LuaJIT automatically >> so that users who want to use LuaJIT could easily build Vim with >> LuaJIT. >> >> For this purpose I added a new configure option `--with-luajit`. >> Here is a patch. This changes only configure. >> >> https://gist.github.com/shirosaki/5663617/ >> >> When adding `--enable-luainterp --with-luajit` as configure option, >> configure tries to use LuaJIT instead of Lua . >> Just with `--enable-luainterp` (without --with-luajit) configure tries >> to use Lua as before. > > What you say hints that the JIT one is always better. So why not use > luajit when it's available, falling back to non-JIT when it's not? > Then it would work well for people who don't even know about the option. > Right? > > The option might still be useful to force using one or the other. > Perhaps the JIT version is released a bit later? > That was discussed before at https://github.com/vim-jp/issues/issues/348. If both Lua and LuaJIT are installed on an environment, it may be good to be selectable Lua or LuaJIT for plugin developers to test both versions. Now Lua 5.2 is released. But LuaJIT version is still Lua 5.1 compatible. 5.2 is not compatible with 5.1 If a user want to use Lua 5.2 and both Lua and LuaJIT are installed, it is better to be selectable. Indeed I can change configure to give high priority to LuaJIT if is's OK. Possible way is: --enable-luainterp: use LuaJIT, but fallback Lua if LuaJIT is not available --enable-luainterp --with-lua: force to use Lua Any ideas? -- Hiroshi Shirosaki -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
