
On 03/07/2011 10:13 AM, Stewart, Robert wrote:
Chad Nelson wrote:
"Stewart, Robert"<Robert.Stewart@sig.com> wrote:
For example, on the "fast" part, if you had said that portability was your first priority, but that speed was a close second, you would have gained your point without the negative backlash that ensued.
Which is confusing to me, because to my eyes, it's merely a rephrasing of what's already there. One that fails to convey the enthusiasm I felt at the time, and still do to a lesser extent.
Of course I'm just rephrasing, but the result is different. Your version is to say that the library "is fast." Fast isn't an objective criteria, so the reader will ask, "Relative to what?" Since you don't specify the point of comparison and provide no benchmarks to explain, the reader then is free to suppose any point of comparison of their choosing.
In my version, the statement is that speed is an important goal. How well you met that goal, how much it suffered due to portability being more important, etc., is left unspecified. That leaves the reader with a "warm fuzzy feeling" that you thought performance was important, but no room to infer their own point of comparison.
My version may not reveal your enthusiasm as obviously, but it comes close I think.
The documentation should primarily be accurate, rather than serve as marketing material. Frankly, talking about speed as a goal at all seems rather misleading, at least from what has been said in this discussion (I haven't examined the code nor run any benchmarks myself). Phil Endecott's benchmarks showed that for small fixed sizes, xint is hundreds of times slower than a hand-coded version, which I think we can all agree means that in this case xint can only be considered "very slow". For larger sizes, benchmarks comparing it to GMP and other alternative libraries are critical, I'd say. It appears, though, that anyone caring about speed would want to use GMP or another library, rather than xint. Speed is one of the primary reason that people use C++ at all, and that is why it is critical for C++ libraries to be as efficient as possible. This is particularly the case for a library like xint with the purpose of numeric computations, which may constitute a significant fraction of the program runtime. (In contrast, libraries like function and shared_ptr should obviously be as fast as possible, but we can expect that they will contribute to only a tiny fraction of the program run time.) The argument has been made that xint may serve primarily as a way to test an interface, and after it is standardized, compiler vendors will produce optimized implementations. However, Boost to a large extent has the reputation of containing, for the purposes its libraries support, the very best C++ libraries, rather than being merely a testing ground. Furthermore, I expect that even if its interface is somewhat better than that of GMP or other libraries, it will simply be unacceptable to most potential users that it is significantly slower, and therefore its interface won't actually get the testing that is desired.