Re: performance benchmark results on Julia's benchmark

  • From: Francesco Abbate <>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 14 Sep 2012 22:47:14 +0200

2012/9/14 pingon begand <sbronfion@xxxxxxxxx>:
> How does GSL add the the |x| syntax as well as the imaginary unit i?

Well, to add the short function syntax I've modified the LuaJIT
parser. This was easy enough and safe since it is just a different
syntax for simple anonymous functions.

The imaginary unit for the other side was a gift from Mike :-) LuaJIT2
support the imaginary syntax "out of the box". It is encoded in the
parsing of numbers so that if you write 2.4i it will recognize it as
an imaginary number. I believe it was added with FFI.

I'm really happy that Mike decided to support C99 complex numbers
since the beginning. This was a wise decision I think.


Other related posts: