Re: function to check if a symbol in a library exists or not

  • From: Mike Pall <mike-1207@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 18:11:46 +0200

Henk Boom wrote:
> In what cases are pcall/xpcall expensive or cheap?

Calling pcall/xpcall and returning from it with no error (true
return value) is very cheap and zero-cost if JIT-compiled.

Throwing an error is expensive (very expensive on some platforms).

--Mike

Other related posts: