
Overall, I think there is a need for this library and it works as described, so it should be Accepted. However, I have a serious concern with the performance when generating large numbers of GUIDs (see below). If not addressed, this might cause people to choose faster solutions over this library. - What is your evaluation of the design? I think the design is reasonable and complete enough for my use. I agree with a previous comment that UUID would be a better name for the library. - What is your evaluation of the implementation? I am concerned about the performance of this library when generating a large number of GUIDs. I wrote two small programs to compare performance between MSVC 8.0 native mode using the Boost.GUID library and C++.CLR using the Microsoft System.Guid library. The CLR version ran much faster. For ten million GUIDs, the times were 5 seconds for System.Guid, 16 seconds for Boost.GUID (random number based) and 12 seconds for Boost.Guid (name-based). The source code for the programs is attached. I would have expected the native mode program to run faster or about the same. Is there something wrong with my code? Could this be caused by the Thread lock? Or maybe the random number generator takes more time? - What is your evaluation of the documentation? At the start of the document, I would prefer a text paragraph or two describing what a GUID is, what they look like, and what the library does with them (input/output/create). Also, a description of the name-based and random-number-based alternatives might help up front. In the Design Notes section, could you provide a link to a SHA-1 reference like http://www.itl.nist.gov/fipspubs/fip180-1.htm. - What is your evaluation of the potential usefulness of the library? I think this is a useful library for many purposes. With multi-threading and multi-processor architectures becoming more popular, UUIDs will be used more frequently. - Did you try to use the library? With what compiler? Did you have any problems? Yes, I tried a minimal example to test the performance using the MSVC 8.0 compiler. See my performance concerns above. - How much effort did you put into your evaluation? A glance? A quick reading? In-depth study? Moderate. I read the documentation and skimmed through the source code. - Are you knowledgeable about the problem domain? I have used UUIDs in the past and know, in theory, how they are generated. But I have always used databases, libraries, or utility programs to generate them. Regards, Dave Jenkins

"Dave Jenkins" <david@jenkins.net> wrote in news:f1t1qp$ra8$1@sea.gmane.org: < snip >
- What is your evaluation of the implementation?
I am concerned about the performance of this library when generating a large number of GUIDs. I wrote two small programs to compare performance between MSVC 8.0 native mode using the Boost.GUID library and C++.CLR using the Microsoft System.Guid library. The CLR version ran much faster. For ten million GUIDs, the times were 5 seconds for System.Guid, 16 seconds for Boost.GUID (random number based) and 12 seconds for Boost.Guid (name-based). The source code for the programs is attached. I would have expected the native mode program to run faster or about the same. Is there something wrong with my code? Could this be caused by the Thread lock? Or maybe the random number generator takes more time?
First we aren't comparing the same thing. System::Guid::NewGuid creates a time-based guid and my library creates either a name-based or a random-number-based guid. But regardless, my library should be faster. I am sad that it is 2-3 times slower. It does not seem to be the thread lock. Running your test with BOOST_DISABLE_THREADS shows little improvement. I have not profiled my code yet. I assume that the random number generator is slower than I would like, but I believe that I may be using it inefficiently. I will do my best to improve the speed.
- What is your evaluation of the documentation?
At the start of the document, I would prefer a text paragraph or two describing what a GUID is, what they look like, and what the library does with them (input/output/create). Also, a description of the name-based and random-number-based alternatives might help up front. In the Design Notes section, could you provide a link to a SHA-1 reference like http://www.itl.nist.gov/fipspubs/fip180-1.htm.
Agreed. < snip >
Regards, Dave Jenkins
Attachment decoded: untitled-2.txt ------=_NextPart_000_003D_01C79241.6DA221A0 #include <boost/guid.hpp> #include <boost/progress.hpp> #include <string> #include <vector>
int main(int, char*[]) { using namespace boost;
int const N = 10000000; std::vector<guid> g; g.reserve(N); guid dns_namespace_guid("6ba7b810-9dad-11d1-80b4-00c04fd430c8"); timer t1; for (int i=0; i<N; i++) g.push_back(guid::create()); //g.push_back(guid::create(dns_namespace_guid, "www.widgets.com", 15));
std::cout << "elapsed time: " << t1.elapsed() << '\n'; std::cout << "count: " << N << '\n'; return 0; }
Attachment decoded: Test1.cpp ------=_NextPart_000_003D_01C79241.6DA221A0 // TestCLR.cpp : main project file. using namespace System; using namespace System::Collections::Generic;
int main(array<System::String ^> ^args) { const int N = 10000000; List<Guid> ^g = gcnew List<Guid>(); g->Capacity = N; DateTime t0 = DateTime::Now; for (int i = 0; i < N; i++) g->Add(Guid::NewGuid()); TimeSpan ts = DateTime::Now - t0; Console::WriteLine("elapsed time=" + ts.ToString() + " Count="+g->Count.ToString()); return 0; }
Attachment decoded: TestCLR.cpp ------=_NextPart_000_003D_01C79241.6DA221A0 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost Attachment decoded: untitled-5.txt ------=_NextPart_000_003D_01C79241.6DA221A0--
Andy.
participants (2)
-
Andy
-
Dave Jenkins