[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Slow performance in writing to a driver
- From: Dolphin <dhawkins@...>
- Date: Thu, 14 May 2009 19:02:37 +0000 (UTC)
If you haven't already, you should try to take lua out of the equation and make
sure the code responds as expected. Is your application the master or the
slave? If you are the master, are you sure you are continuing to clock bits out?
Since you are already doing stuff in C, I would avoid using a lua function like
write_format. C would be able to do this much more quickly without all the
temporary string overhead, math lib function calls and divide/mod.
I would create a lua_CFunction that takes whatever addressing you need, plus a
lua string and optional position args (same as string.sub).