[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Inling C/Fortran in Lua
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 3 Jul 2009 19:26:07 +0200
On Fri, Jul 3, 2009 at 7:08 PM, Graham
Wakefield<lists@grahamwakefield.net> wrote:
> It's definitely fast, but the API is cumbersome... I'm toying with LPEG to
> write a kind of slimmed down C that talks more seamlessly with Lua, as a
> more usable alternative for JIT compiled inline code. Definitely some
> potential, but also some trickiness.
Oh yes, C/C++ is a bastard to parse (learned the hard way)
I did not jump directly into implementation, precisely because Lua is
getting faster with JIT, to the point where having inlined C (or
Fortran) would be something that's only useful occaisionally, like
inlined asm in C. And tolua++ really is clever.
It remains true that most big high-performance number-crunching apps
spend most of their cycles in 10% of the code - that's essentially the
Knuth rule of thumb. The other 90% of the code is mostly bureaucracy,
which is not Fortran's forte... (or C, for that matter)
steve d.