Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to check if reader has multiple results
Message
De
02/08/2013 11:04:04
 
 
À
02/08/2013 06:59:45
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579688
Message ID:
01579742
Vues:
31
>Yes, I remember looking at that some time ago and I posted the results here
>Up the 4 args and you get a call tho String.Concat( 2 to 4 args overload)
>More than 4 - an array of string[] is created putting each arg into the array
>Then String.Concat( string[] ) gets called
>http://msdn.microsoft.com/en-us/library/System.String.Concat.aspx
>
>>I'd expect
var stringres;
>>stringres = "";
>>stringres = stringres + str1;
>>stringres = stringres + str2;
>>stringres = stringres + str3;
>>to be rewritten to form 1 by an optimizing compiler as such code can be found - if they can inline whole functions, inlining concats should be easy
>
>No, I had checked before replying
>
>Ildasm shows three calls to String.Concat(string, string)

Wow - not much optimization in that stage. And if they made the effort for 4 args in ILDASM, that hints at no such optimization when compiling to machine code. The Java Hotspot JVM optimizes some such string operations, even recursive, if given those parameters...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform