On 12/19/05 6:54 PM, Perrin Harkins wrote:
> On Mon, 2005-12-19 at 18:35 -0500, John Siracusa wrote:
>> If the number of iterations is fixed, you get a usable wallclock time in the
>> results.
>
> The danger here is that cmpthese does not use that, so the compare
> option is misleading. I got bitten by that once, assuming that
> the :hireswallclock option would change what cmpthese compares.
I think the default output of cmpthese() is more valid than wallclock time
simply because it's better able to filter out other unrelated system
activity. That's why it's the default. But the bench.pl script gives all
possible options:
--time
--compare
--time-and-compare
Select only one of these flags to specify whether to time, compare,
or both time and compare each benchmark. (perldoc Benchmark and
see the timethese() and cmpthese() functions.) "Compare" is the
default.
The "--hi-res-time" option is just a modifier for the time* options.
>> Anyway, the fact that working around the feature/performance deficiencies of
>> a particular ORM is "common practice" is hardly a convincing endorsement :)
>> In the particular case of fetching related objects, many ORMs do include
>> this feature, and users like it and use it.
>
> I completely agree. That's why I brought it up -- I'm interested in
> seeing the performance penalty (in extra queries) that Class::DBI has in
> this regard highlighted.
It's about as "highlighted" as it's going to get in the results of the
sub-object tests. For example, in the "search with 1-to-1 sub-objects"
tests, CDBI is running many queries, whereas DBIC, CDBI::Sweet, and RDBO are
all doing a JOIN to get the info in a single query.
One step up from that are the "search with 1-to-1 and 1-to-n sub-objects"
tests that RDBO is doing in a single query but that the others are doing in
multiple queries. (DBIC and CDBI::Sweet are doing a JOIN and then multiple
single-row SELECTs, and CDBI doing a series of SELECTs with no JOINs.)
-John
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object