0
votes
5answers
498 views
+50

Is there any performance benefit in checking the item count prior to executing a foreach loop?

I saw this in code and was wondering if there is any performance benefit to checking the item count prior to looping: if (SqlParams.Count > 0) foreach (var prm in SqlParams) ...
0
votes
1answer
80 views

ASP.net performance code behind vs app_code

I am wondering about performance of a web site/application when there is code in the code behind files rather than when the code is moved to separate files in the App_Code folder. My understanding ...
1
vote
5answers
373 views

Which statement performs best?

I was faced with this question by my team leader. Statement 1 (written by me): lnkbtn1.visible = lnkbtn2.visible = lnkbtn.visible = false; Statement 2 (written by my team leader): ...
-1
votes
3answers
911 views

C++ Performance vs. Java/C# [closed]

My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native ...
0
votes
0answers
307 views

Best method for async initialization of view model in MVVM pattern (WPF)

I'm working on a business application (C#, WPF, EF, MVVM). I need to load a bunch of items from database, create view models for them and put them in a window. Is there a way to create the view model ...
2
votes
2answers
225 views

Implementing set of processes in a stored procedure or through the code?

I want to know what's the suitable method to implement the following case (best practice). If i make a set of processes like this: select data from set of DB tables. loop on the selected result. ...
3
votes
2answers
501 views

CA1819: Properties should not return arrays. Does this happen only with arrays? If yes, why?

I have a question about CA1819 msdn performance warning. The rule is: Arrays returned by properties are not write-protected, even if the property is read-only. To keep the array tamper-proof, the ...
1
vote
1answer
255 views

Effective implementation of “array” of type Int X String -> String in .NET or in general

The question in general is: is there a more effective way of implementation of table with structure like Dictionary<int, Dictionary<string, string>>? The reason I am asking this is ...
0
votes
1answer
540 views

Increase application performance [closed]

I'm writing a program for a company that will generate a daily report for them. All of the data that they use for this report is stored in a local SQLite database. For this report, the utilize ...
79
votes
11answers
19k views

What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]

A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
3
votes
2answers
168 views

Patterns for integrating with a slow external service

Was hoping someone could provide some patterns/techniques/ideas to increase performance for the following scenario. Am integrating with an external ordering system via SOAP. The external system can ...
6
votes
3answers
6k views

Practical size limits of a Hashtable and Dictionary in c#

What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain. I'll be working with large ...
20
votes
6answers
3k views

C++ Renaissance - marketing slogan? [duplicate]

Possible Duplicate: What does the latest “C++ Renaissance” mean? Lately, I hear a lot about C++ Renaissance. What is that? C++ is currently undergoing a renaissance. This ...
0
votes
3answers
2k views

PHP vs C# performance

I have a application that is part console application written in C# and part PHP web application. The console application connects to multiple serial devices and reads data pertaining to moisture ...