lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2009/10/12 Fernando P. García <>:
> In most languages (not only scripting) the use of single quotes is faster
> than double quotes, does it is applicable in Lua? perhaps for the other ways
> define strings?
> Blessings!

I don't know about *most* languages - there are a couple that have
variable interpolation in double-quoted strings but not single-quoted,
but it does not happen at all in Lua. In non-scripting languages it
seems like single characters are mainly used to delimit single
character values, not strings, so it's not really comparable.

Also, remember that Lua code is always compiled before it runs. As
long as you are not compiling your code constantly it would never
matter how string literals are defined anyway, they all become the
same thing in the bytecode.