|
Boost-Build : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-07-22 07:16:05
My Jam-language implementation of classes was never inteded to be used as a
generalized replacement for built-in Jam lists. It was just designed to be
a mechanism for improving code organization.
I don't think there's any way you can start using "container classes" as
the primary data structure in lieu of Jam lists and expect reasonable
performance.
find-another-way-ly y'rs,
dave
----- Original Message -----
From: "Vladimir Prus" <ghost_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Monday, July 22, 2002 8:05 AM
Subject: [jamboost] class.jam performance issues
>
> I'm afraid we have a serious performance problem. I've wrote a simple
> example, where a rule calls itself recursively until a recursion limit is
> reached. In each invocation, a simple class is created. There's a table,
> giving the number of time jam's function 'hashitem' is called, which is
> responsible for a large fraction of jam's running time.
>
> Limit Calls
> 1 1082194
> 200 1276412
> 300 1433818
> 400 1631218
> 500 1868618
> 600 2146018
> 700 2463418
> 800 2820818
>
> (about 2179 per level)
>
> Now let's try without creating the class.
> 1 1081336
> 800 1104008
>
> (about 28 per level w/o)
>
> This is very slow! It essentially means that if I switch from using jam
list
> to using contaner.vector in one place, I'll have 100x slowdown.
Actually...
> it seems worse than that: each construction of class causes a call to
> BACKTRACE and that rule returns the list of all stack frames -- I suspect
a
> quadratic running time is possible.
>
> As an experiment, I've replaced the call to BACKTRACE in class.__init__
to
> call of a new builtin which directly returns the caller. This
> resulted in 1485639 calls for limit or 800 ( 504 calls per level).
> That's clearly not enough, and we need to do something more. Personally,
I'd
> prefer introducing 10 new builtins to having such overhead.
>
> At this stage it is still possible to work on build system, but once we
start
> trying real examples, this will become problem #1.
>
> - Volodya
>
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk