digitalmars.D - Proposal - clear() method for OutBuffer
- Dave (19/19) Aug 29 2004 Say you're using an OutBuffer to construct a key for an AA. Right now yo...
- Dave (8/35) Aug 30 2004 Hmmm, "given private access" below should most likely be "given protecte...
- J C Calvarese (14/54) Aug 31 2004 If your referring to the DSLG/Deimos Rising/Phobos Rising discussion,
- Dave (22/57) Sep 01 2004 Anyone have any comments on the "clear()" method for OutBuffer?
Say you're using an OutBuffer to construct a key for an AA. Right now you either have to new an OutBuffer for each key, or you can use public access to the data members to clear it, like this: (The point is not the contrived example. The point is being able to format a string buffer in a code and runtime efficient way.) How about if OutBuffer.data and OutBuffer.offset are given private access, and a clear() method is added to OutBuffer that does the same as above? Perhaps there is a more efficient method, but the above is 4-6x faster than new'ing an OutBuffer for each loop depending on how often the loop is run. Thanks, - Dave
Aug 29 2004
Hmmm, "given private access" below should most likely be "given protected access". I haven't had a chance to follow the 3rd Party Phobos threads as closely as I'd like and I don't know if there is even a consensus yet.. Is there now a better place to post/discuss library related issues? Thanks, - Dave Dave wrote:Say you're using an OutBuffer to construct a key for an AA. Right now you either have to new an OutBuffer for each key, or you can use public access to the data members to clear it, like this: (The point is not the contrived example. The point is being able to format a string buffer in a code and runtime efficient way.) How about if OutBuffer.data and OutBuffer.offset are given private access, and a clear() method is added to OutBuffer that does the same as above? Perhaps there is a more efficient method, but the above is 4-6x faster than new'ing an OutBuffer for each loop depending on how often the loop is run. Thanks, - Dave
Aug 30 2004
Dave wrote:Hmmm, "given private access" below should most likely be "given protected access". I haven't had a chance to follow the 3rd Party Phobos threads as closely asIf your referring to the DSLG/Deimos Rising/Phobos Rising discussion, it's still alive and pretty much on track. It's moved over to a forum at dsource, though: http://www.dsource.org/forums/viewforum.php?f=31I'd like and I don't know if there is even a consensus yet.. Is there now a better place to post/discuss library related issues?This newsgroup is probably still the best place to bring these criticisms up. Walter's still the one who produces those nifty archives with the compiler (and it'll probably be that way forever), and the "Phobos Rising" discussion is still trying to answer fundamental questions like "Who are we?" and "Why are we here?".Thanks, - Dave Dave wrote:-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/Say you're using an OutBuffer to construct a key for an AA. Right now you either have to new an OutBuffer for each key, or you can use public access to the data members to clear it, like this: (The point is not the contrived example. The point is being able to format a string buffer in a code and runtime efficient way.) How about if OutBuffer.data and OutBuffer.offset are given private access, and a clear() method is added to OutBuffer that does the same as above? Perhaps there is a more efficient method, but the above is 4-6x faster than new'ing an OutBuffer for each loop depending on how often the loop is run. Thanks, - Dave
Aug 31 2004
Anyone have any comments on the "clear()" method for OutBuffer? Any code out there that relies on public access to OutBuffer.data and/or OutBuffer.offset? For the current library, there is one line in std/regexp.d (setting data = null) that would need to be changed if the following was changed in std/outbuffer.d: #class OutBuffer #protected: #public: Thanks, - Dave In article <cgvf7n$2h74$1 digitaldaemon.com>, Dave says...Hmmm, "given private access" below should most likely be "given protected access". I haven't had a chance to follow the 3rd Party Phobos threads as closely as I'd like and I don't know if there is even a consensus yet.. Is there now a better place to post/discuss library related issues? Thanks, - Dave Dave wrote:Say you're using an OutBuffer to construct a key for an AA. Right now you either have to new an OutBuffer for each key, or you can use public access to the data members to clear it, like this: (The point is not the contrived example. The point is being able to format a string buffer in a code and runtime efficient way.) How about if OutBuffer.data and OutBuffer.offset are given private access, and a clear() method is added to OutBuffer that does the same as above? Perhaps there is a more efficient method, but the above is 4-6x faster than new'ing an OutBuffer for each loop depending on how often the loop is run. Thanks, - Dave
Sep 01 2004