On the advice of a user, I've timed stringbuilder v string. Here are the
results.
Here are the numbers:
Total # queries 3747
Time in Milliseconds
StringBuilder: String
460.6624 320.4608
350.504 220.3168
240.3456 230.3312
----------- -----------
Ave. 350.504 Ave. 257.0362
Sample query:
"Update ds_active_rate SET (rate, surcharge, min_sec, increment_sec,
begin_date, new_rate, new_rate_date, location_desc, category_id,
country_code, customer_number , user_name)=('0' ,'0','0','0','2 150-01-01
12:00:00','','' ,'Afghanistan', 2,93,'1STAMERIC AN','') where rate_deck =
'COPYRATE' and location_id = 1001 and world_id = 1 and rate_level = 1"
Specs on my machine
1Gig SDRAM
P-IV 2Gig Intel
20Gig Hard Drive
Dell C-640
What I did: I let the routine run till it hit a breakpoint after a timespan
object. Noted the time, and pointed execution back to the first time object
and let it run to the break point. This gave me my three times. Obviously,
some sort of optimization was going on in the background for successive runs
which accounts for increasingly lower times. Then I converted the code to
string and repeated the procedure. I don't claim that these numbers are
scientific. But I did my best to control the process.
My conclusion is: I think these microsoft guys have been feeding us a bunch
of bullshit with this stringbuilder efficiency crap.
results.
Here are the numbers:
Total # queries 3747
Time in Milliseconds
StringBuilder: String
460.6624 320.4608
350.504 220.3168
240.3456 230.3312
----------- -----------
Ave. 350.504 Ave. 257.0362
Sample query:
"Update ds_active_rate SET (rate, surcharge, min_sec, increment_sec,
begin_date, new_rate, new_rate_date, location_desc, category_id,
country_code, customer_number , user_name)=('0' ,'0','0','0','2 150-01-01
12:00:00','','' ,'Afghanistan', 2,93,'1STAMERIC AN','') where rate_deck =
'COPYRATE' and location_id = 1001 and world_id = 1 and rate_level = 1"
Specs on my machine
1Gig SDRAM
P-IV 2Gig Intel
20Gig Hard Drive
Dell C-640
What I did: I let the routine run till it hit a breakpoint after a timespan
object. Noted the time, and pointed execution back to the first time object
and let it run to the break point. This gave me my three times. Obviously,
some sort of optimization was going on in the background for successive runs
which accounts for increasingly lower times. Then I converted the code to
string and repeated the procedure. I don't claim that these numbers are
scientific. But I did my best to control the process.
My conclusion is: I think these microsoft guys have been feeding us a bunch
of bullshit with this stringbuilder efficiency crap.
Comment