Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim スクリプトの実行速度向上/バイトコード化 #347

Closed
koron opened this issue Apr 1, 2013 · 5 comments
Closed

Vim スクリプトの実行速度向上/バイトコード化 #347

koron opened this issue Apr 1, 2013 · 5 comments

Comments

@koron
Copy link
Member

koron commented Apr 1, 2013

トランスレータとか使わず、Vimスクリプトの実行エンジンの速度をあげる方法を議論、研究するスレ。

一番有力なのは @mattn さんの言うとおり、なんらかのバイトコード方式を採用すること。
これの何が良いかというと、実行毎にかかっているパース時間を避けられるようになる点。

@Shougo
Copy link
Member

Shougo commented Apr 1, 2013

はい。まずはそれでどれだけ効果があるのかを試すのが良いと思います。
問題なのは、仮想マシンを0から実装するのは結構面倒そうな点。
vimlparserを使えば楽になるのでしょうか?

@itchyny
Copy link

itchyny commented Apr 7, 2013

todo.txtよりコピペ(手元のでは2672行目)

7   Pre-parse or compile Vim scripts into a bytecode.
    1. Put the bytecode with the original script, with an ":if
       has('bytecode')" around it, so that it's only used with a Vim that
       supports it.  Update the code with a command, can be used in an
       autocommand.
    2. Use a ".vic" file (like Python use .pyc).  Create it when writing a
       .vim file.  Problem: distribution.
    3. Use a cache directory for each user.  How to recognize which cached
       file belongs to a sourced script?

@mattn
Copy link
Member

mattn commented Apr 7, 2013

おぉっと...

@Shougo
Copy link
Member

Shougo commented Apr 7, 2013


todoリストに入っていたとは。知らなかった。

@k-takata
Copy link
Member

vim9scriptの初期実装が入ったことですし、続きは #1332 で議論しましょう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants