lua-users home
lua-l archive

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


On Wed, Oct 12, 2022, at 08:57, bil til wrote:

> I usually hate such benchmarking concerning and interpreter language
> like Lua... . As I see it, the main focus for interpreter language
> should always be flexibility and the C "base code" must be designed
> such, that the "workhorse functions", e. g. with long numeric for
> loops must be handled by this C "base code".

I agree. Initially I had ported the whole back-propagation routine to Pallene,
because it was simpler to have a single function call from Teal to Pallene,
but then I refactored it to instead keep the main routine in Teal and only
move matrix operations to Pallene. It doesn't change the performance
significantly.

I have put the Pallene file and the corresponding Teal type definition file
here: https://gist.github.com/catwell/821554cb251e114cad5cc635056f9bb4

By the way, the main thing I missed in Pallene was assertions. I just
commented them out but it would be nice to have `assert` available.

-- 
Pierre Chapuis