[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Performance
- From: Chris.Kaiser@...
- Date: Tue, 6 Nov 2001 12:05:21 -0800
That's along the lines of what I'm thinking..
Pull the business rules from a database when they change,
plug em' into a C++ template, compile, link, and then refresh
the network's copy. The clients would reload the dlls on a cycle.
Although, I also need to be able to generate new logic. But simple
logic. Walk a tree of rules based decisions and generate the resulting
C++ while satisfying a generic interface that the clients can depend
on. Probably using the same templates.
This is all still in the R&D phase, ...ideas are welcome :)
> -----Original Message-----
> From: David Jeske [mailto:email@example.com]
> Sent: Tuesday, November 06, 2001 10:57 AM
> To: Multiple recipients of list
> Subject: Re: Performance
> On Tue, Nov 06, 2001 at 10:47:08AM -0800,
> Chris.Kaiser@peoplefirst.com wrote:
> > One good reason why, and one that I need, is to convince management
> > that its a worthy solution to some dynamic code generation problems.
> > My boss wants me to generate compiled C++ on the fly based on the
> > user communities mods.
> Okay. I presume this is for performance reasons?
> > We're to build a series of tools to enable the user community to
> > change the business rules on the fly. I'd like for these rules to be
> > generated in lua and parsed from our C++ engine. But I need to
> > convince him that it will be fast enough.
> If this is for performance reasons, then I doubt a lua dynamic
> compiler will be fast enough. The "cost" of executing lua is as much
> in the design of the language as a weak-typed hashtable based
> scripting language as it is because it's an interpreted VM. Dynamic
> compilation can get complicated and only takes care of half the
> Remember the famous quote:
> Premature optimization is the root of all evil in programming.
> ---C.A.R. Hoare
> (often misattributed to D. E. Knuth,
> who was himself quoting Hoare)
> If you think Lua will be fast enough, use it. However, if Lua needs a
> dynamic compilation engine to be fast enough, then just render C code
> during configuration, compile, link, and go.
> David Jeske (N9LCA) + http://www.chat.net/~jeske/ + firstname.lastname@example.org