|
Boost : |
Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2017-09-28 11:31:26
> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Ion Gaztañaga via Boost
> Sent: 27 September 2017 22:06
> To: Joaquin M López Muñoz via Boost
> Cc: Ion Gaztañaga
> Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
>
> On 26/09/2017 22:03, Joaquin M López Muñoz via Boost wrote:
>
> > 4. Same goes for the growing policy. Not even boost::container::vector
> > features a growing
> > policy, which seems an indication that this is not a heavily demanded
> > customization point.
>
> True. But is on my todo list I was recently trying to add customization
> options to Boost.Container containers (I need to offer something
> different to my fans that the standard containers can't offer ;-).
>
> Usually the choice is usually between a factor of 2 and 1.5. The
> theoretical limit value for the growth factor to be able to reuse
> previously allocated memory is roughly 1.61. Howard Hinnant shared with
> my a nice paper about this more than ten years ago showing how to grow
> using a factor of 1.6 and the math behind this. I just reviewed that
> brief paper recently, and since it's not longer online, Howard kindly
> has given me permission to share it with the Boost community.
I can't read the attached fully, but it seems an significant calculation to document properly (or reference fully) in any software that is using a growth factor.
Boost has the floating-point constant phi
http://www.boost.org/doc/libs/1_65_1/libs/math/doc/html/math_toolkit/constants.html
but perhaps it needs to be integral-ish like 1.5?
But the assumptions made by need to be documented and examined closely too?
"In theory, there is no difference between theory and practice.
But in practice, there's no similarity."
Jan L A van de Snepscheut
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are.
If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
Paul
--- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk