I went to the Triangle .NET user group meeting last night ( where the speaker was Brian Harry - formerly of DaVinchi software and One Tree Software (they initially wrote Source Safe, and sold it to MS for a couple of million).
Here's a few interesting things about the CLR:
[ol][li]The CLR supports creating arrays with lower bounds (dimensioning arrays to start somewhere other than zero), but none of the languages support it[/li]
[li]Rectangular arrays are much more memory efficient than jagged arrays. But a little slower - MS will address this in the next release.[/li]
[li]Use PEVerify after building to check for buffer overruns, common errors, etc.[/li]
[li]NGen image won't be used if the policies (permissions) have been changed, or a Windows service pack, or other "environment" change has occurred -- it will run the (slower) JIT version instead. After making those sorts of changes you have to re-NGen on the target machine[/li]
[li]NGen loads about 40% faster (no JIT needed), but consumes more memory.[/li]
[li]Future versions of the framework may use Palladium digital rights management to protect the intellectual property in your assemblies. No obfusticator required - the OS will deny access to the (encrypted) MSIL.[/li]
[li]Minimum size of an object is 12 bytes. It will be much greater if you have any virtual methods, or if you use the default implementation of GetHashCode, or your object participates in COM interop.[/li]
[li]Don't trust the default implementation of GetHashCode. You will get different values if your object is persisted, or remoted. Note that classes like String override the default implementation, and do generate repeatable hash values.[/li]
[li]In v1.1, you can enable customer debug probes in your builds. These will check for common programming mistakes (freeing a delegate reference too soon, etc) and alert you via a message.[/li]
[li]StringBuilder objects become immutable after calling ToString on them. If you then attempt to concatenate more string info onto them, a copy of the (now)String is made into fresh memory. This "lazy copy" is a performance improvement, as most programs do: concat..concat..concat..ToString and then throw the StringBuilder away.[/li]
[/ol]
Chip H.
Here's a few interesting things about the CLR:
[ol][li]The CLR supports creating arrays with lower bounds (dimensioning arrays to start somewhere other than zero), but none of the languages support it[/li]
[li]Rectangular arrays are much more memory efficient than jagged arrays. But a little slower - MS will address this in the next release.[/li]
[li]Use PEVerify after building to check for buffer overruns, common errors, etc.[/li]
[li]NGen image won't be used if the policies (permissions) have been changed, or a Windows service pack, or other "environment" change has occurred -- it will run the (slower) JIT version instead. After making those sorts of changes you have to re-NGen on the target machine[/li]
[li]NGen loads about 40% faster (no JIT needed), but consumes more memory.[/li]
[li]Future versions of the framework may use Palladium digital rights management to protect the intellectual property in your assemblies. No obfusticator required - the OS will deny access to the (encrypted) MSIL.[/li]
[li]Minimum size of an object is 12 bytes. It will be much greater if you have any virtual methods, or if you use the default implementation of GetHashCode, or your object participates in COM interop.[/li]
[li]Don't trust the default implementation of GetHashCode. You will get different values if your object is persisted, or remoted. Note that classes like String override the default implementation, and do generate repeatable hash values.[/li]
[li]In v1.1, you can enable customer debug probes in your builds. These will check for common programming mistakes (freeing a delegate reference too soon, etc) and alert you via a message.[/li]
[li]StringBuilder objects become immutable after calling ToString on them. If you then attempt to concatenate more string info onto them, a copy of the (now)String is made into fresh memory. This "lazy copy" is a performance improvement, as most programs do: concat..concat..concat..ToString and then throw the StringBuilder away.[/li]
[/ol]
Chip H.