Timeline for Performance of object-to-string conversion
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 6, 2015 at 12:17 | history | edited | Bruno Costa | CC BY-SA 3.0 |
deleted 571 characters in body
|
Apr 6, 2015 at 12:06 | history | edited | Bruno Costa | CC BY-SA 3.0 |
added 604 characters in body
|
Apr 6, 2015 at 10:28 | comment | added | Bruno Costa | @Denis Oh I see your problem with the reference type now... If that's the case you may try one of two things: Get the value in string from the database or use AsParalell to use parallelism and see if that helps you. | |
Apr 6, 2015 at 10:22 | comment | added | Denis |
I impemented TryCast because it is impossible to do decimal value_decimal = value as decimal . as requires reference-type. So I forced to write decimal? value_decimal = value as decimal? and value_decimal.Value . As showed the profiler - millions of .Value make my code much slower.
|
|
Apr 6, 2015 at 10:20 | comment | added | Denis | I tried your version: it works a little slower (~580ms) than my (~490ms). | |
Apr 6, 2015 at 9:57 | comment | added | Bruno Costa | The best option though would be to retrieve the value as a string from the database already. You might want ot consider that. | |
Apr 6, 2015 at 9:33 | history | answered | Bruno Costa | CC BY-SA 3.0 |