|
OK, ok, you might be right!
I do wonder, sometime, how far the fabled "compiler optimization" go!
I know about function inlining, dead code removal, and rewrite 1 mathematical expression...
Not so sure about rewriting the function completely like you suggest though... decompilation snippet across the web don't mention them!.....
|
|
|
|
|
The examples you've given deals with a proper variables.
How about temporary string buffers?
Here is a case that demonstrates the goodness of StringBuilder
string returnNumber = "";
for(int i = 0; i<1000; i++)
{
returnNumber = returnNumber + i.ToString();
}
String Vs StringBuilder (C#)[^]
I felt these cases can be picked up by the compiler and optimize it automatically with SB.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
It's better to keep the compiler independent of the framework, otherwise you will end up with a dead end full of dependencies in both directions.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Vunic wrote: Slackers
Let's not put all the blame on the Slackers.
|
|
|
|
|
|
I haven't read any of Jeff's posts in quite a while. I think I will catch up a bit in my down time.
Also, Jeff used to be a member of this site before he became famous with Stack Overflow. I don't think he was very active though, here at CP.
|
|
|
|
|
391 lousy ms? That's why I'll never understand Java, .NET and web programming. 391 ms means 3 - 9 products passing through a point of a production line; In any real time or high throughput system 391 ms are long as an eternity in Hell.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
"When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey
|
|
|
|
|
Apples to oranges. Production lines don't have software that do 100,000 iterations of string concetinations.
|
|
|
|
|
I'm not criticizing you for posting here, but I'd prefer to see questions like this posted in the C# forum. While the C#forum ... imho ... has changed stripes several times over the years, it once was a place that substantial technical discussion occurred on C# language issues, not just an auxiliary QA which it often is now.
I keep wondering about what happens under-the-hood, and about the efficiency of, using string.Format:
string.Format("blah {0} blah2 {1}", "blah-blah", "blah-blah-blah");
cheers, Bill
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
|
Thanks for the link !
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
I was about to focus more on the slacking part, but end up raking some technical talk.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Java compiler actually does it automatically nowadays. C# one doesn't, AFAIK.
But of course, if you care for performance, use a real programming language
|
|
|
|
|
You've been the man , may be for more than a decade now. lol
The replies always had some info I never knew about.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Vunic wrote: When the whole world knows making "+" to concatenate strings does things less efficient than using string-builder
Aaaaaand the whole world is wrong [for making a sweeping generalisation*]:
Jon Skeet investigates[^] - for C# at least.
Oh and
string foo = "bar" + "baz";
compiles down to the same thing as
string foo = "barbaz";
more or less.
*Irony intended.
|
|
|
|
|
Keith Barrow wrote: Jon Skeet investigates[^] -
Such a good read. thanks man
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
|
Cool, but a higher resolution had been nice...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
I laughed
And yes, what a pity the resolution is so low.
Thanks
I never finish anyth
|
|
|
|
|
Hey, Waddayaknow? I noticed that the file name contained the word "medium", so I tried just exchanging it for "large", and voila:
Larger version[^]
I also tried "xlarge" and "extralarge", but with no result...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
You are my new hero, after Chuck Norris.
I'll create a club to worship you.
I never finish anyth
|
|
|
|
|
phil.o wrote: I'll create a club to worship you.
Oh no, not another one...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
fyi: you can change "medium" in the url to "large" and see a larger picture: [^].
Just guessed this might work, and tried it.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
Hahaha brilliant that had me crying with laughter
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|