From: Joel de G. <jo...@bo...> - 2005-10-22 02:14:13
|
Martin Wille wrote: > Joel de Guzman wrote: > I created a trivial test program, used it with Boost 1.33.0, and it > turned out to use the memory mapped implementation as intended. So, > Hartmut's patch definitely fixed the problem and the fix still works. > > I suspect Matthew was using an older version of Spirit. > > > Regarding the speed: profiling seems to indicate that the slowest part > of file_iterator is its dtor. Unfortunately, improving the speed of the > dtor isn't too easy. The dtor doesn't have any code; its execution time > is dominated by the execution time for the dtor of a shared_ptr member. > A way to improve that speed would be to add a policy to file_iterator > that would allow the user to specify that the file_iterator is used only > inside a single thread. In that case, a thread-unsafe (and therefore > much faster) implementation for a reference counting pointer could be > used. Without adding a policy, we could use the Spirit threading flags > for that. The challenge would be to make this as fast as loading a vector in memory and parsing from there; or something close. Is this possible? Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net |