[erlang-questions] Efficiency of qlc

Solomon solomon.wzs@REDACTED
Tue Nov 20 03:18:15 CET 2012

I want to wirte a sql compiler for mnesia, so I need to dynamic compile the
query string by qlc:string_to_handle/1, but it is much slower than native
code. And I found that:

code 1:

code 2:

so I think the reason is that: code 1 run by erl_eval, it scan and parser
the code every time, and code 2 by beam, so code 1 was much slower than
code 2.
Is there any method to solve this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121120/a8a64f84/attachment.htm>

More information about the erlang-questions mailing list