Click here to Skip to main content
15,894,460 members
Everything / General Programming / Performance

Performance

performance

Great Reads

by Michael Sydney Balloni
Different languages and approaches are evaluated for a file and string processing benchmark
by Sergey Volk
Open source framework for monitoring Asp.Net Web Api 2 and MVC5 applications performance without using windows performance counters, automates performance counters data collection, store and visualization.
by Arthur V. Ratz
This article is a practical guide on using Intel® Threading Building Blocks (TBB) and OpenMP libraries for C++ based on the example of delivering parallel scalable code that implements Burrows-Wheeler Transformation (BWT) algorithm.

Latest Articles

by Tamar Christina
The article discusses various techniques for improving program performance by optimizing code for compilers, focusing on the ARM platform.
by Dev Leader
Learn how to use BenchmarkDotNet to effectively create and run benchmarks on your C# code. Dig into where you have opportunities to optimize your C# code!
by Higty
Fastest mapper in the world, easy to Use, ZERO configuration, FULL customization
by Gerardo Recinto
In-memory B-Tree sorted dictionary

All Articles

Sort by Score

Performance 

27 Sep 2022 by Michael Sydney Balloni
Different languages and approaches are evaluated for a file and string processing benchmark
15 Feb 2017 by Sergey Volk
Open source framework for monitoring Asp.Net Web Api 2 and MVC5 applications performance without using windows performance counters, automates performance counters data collection, store and visualization.
2 May 2017 by Arthur V. Ratz
This article is a practical guide on using Intel® Threading Building Blocks (TBB) and OpenMP libraries for C++ based on the example of delivering parallel scalable code that implements Burrows-Wheeler Transformation (BWT) algorithm.
11 Feb 2013 by DahlSailRunner
Really effective logging using Enterprise Library and just a little custom code.
2 Jun 2014 by Bartlomiej Filipek
How memory access patterns can influence performance of your code
1 Jul 2023 by Ryan Scott White
A fast, possibly the fastest, square root function for Big Integers and Floats in C# and Java.
23 Mar 2019 by Minh Tuan Do
A considerable method to speed up query running time
6 Feb 2023 by Vadim Stadnik
Simple and useful alternative to traditional memory pool
3 Jan 2013 by Young Ye
This article is the part 3 of the data display Performance Optimization series. It talks about performing multiple searches against the virtual list.
22 Aug 2012 by Sergey Alexandrovich Kryukov
The question is totally incorrect due to the approach: there is no "performance" in general. The performance can be considered only in regard to some particular code. And particular implementation of a compiler. And platform.Then, the comparison itself can only be done for some code which is...
24 Apr 2014 by thatraja
Check my past answers on all topicsWebsite Optimization[^]WCF optimization[^]Web Services optimization[^]SEO optimization[^]Database optimization[^]Data Loading optimization[^]Crystal reports optimization[^] | Additional one[^]SSRS optimization[^]Coding Standards/ReviewCode...
27 Jan 2015 by Vaclav Naydenov
Comparing the performance of two similar CRUD server apps, one written in Python and SQLAlchemy, the other in C++ and YB.ORM.
21 Jul 2018 by Ben Hall (failingfast.io)
Micro-Benchmarking Your C# - Pitfalls and A Tool To Help You Mitigate Them
3 Jan 2013 by Young Ye
This article solve the performance issue while loading and displaying large amounts of data by using a virtual list with paged data technique.
21 Jan 2013 by Amit Bezalel
Improving XmlSerialization performance.
16 May 2014 by Bartlomiej Filipek
Description of my emitter and generator module for particle system
9 Apr 2011 by Wendelius
Could it just be that the specs you have are incomplete? TBD could mean To Be Defined.
22 Aug 2012 by JackDingler
One aspect not addressed so far, is whether it matters or not.In modern systems, it's rare that the language is a serious factor in determining performance.The way you structure your code, makes a bigger impact than the compiler.Simply avoiding inefficient programming practices, can...
25 Apr 2013 by Sergey Alexandrovich Kryukov
Please see my comment. Detecting a leak is not easy, and even understanding what a leak is is not so simple when it comes to managed memory. Please see my past answers explaining managed and unmanaged memory leaks:Garbage collectotion takes care of all the memory management[^],deferring...
19 Feb 2014 by Sergey Alexandrovich Kryukov
There is no just C and just C++. There are different compilers for different platforms. And with every compiler, it's possible to write anything in such a stupid way killing performance quite well. Having all that, how are you going to compare languages? And if you also remember that you can...
16 Jan 2016 by Najeeb Shaikh
Unlike SQL databases, Redis does not support querying by columns natively, which means that you have to maintain your own indexes. As it turns out, Redis provides a rich set of data types to the programmer to ease this task.
13 Sep 2017 by SlavaUtesinov
How to solve problem, when ng-repeat directive iterates very big array and it causes significant performance degradation
20 Jun 2011 by CPallini
Probably yes. You should arrange a little test to verify execution times. You may also have a look at Thread Pool Pattern[^].
16 Oct 2011 by Shivprasad koirala
If you want to quickly get index suggestions and improve performance in SQL Server, then Profiler and tuning wizard is the first place to start.
3 Jan 2013 by Young Ye
This article is Part 2 of the data display performance optimizing series. The Selectable Virtual List is a list where you can select individual items in the list, and move it out or in to the list. You can also use the select all checkbox to select all items in the list.
22 Aug 2012 by Debdatta Basu
C++ takes a hit on virtual functions. But it is not a disadvantage of the language, as you will get similar performance hits if you emulate virtual functions using function pointers in C. C++ has a lot of features that can make very complex code very fast. For example, templates. C++ could...
3 Oct 2012 by bbirajdar
Your responses seems to be more insulting .. I checked your question.. Manjuvijayan - 21 hrs agoyou need not to waste ur time yar...Reply Manjuvijayan - 21 hrs agonow you are violating the site rules..Reply Manjuvijayan - 21 hrs agopublic nuisance.......It is...
9 Jul 2014 by Bartlomiej Filipek
Description about my simple OpenGL renderer for the particle system
21 Nov 2014 by Farzad E. (dNetGuru)
.Net framework provides two classes that implement AES, a native implementation that calls CAPI and AesManaged which is a purely managed implementation. Which one should you use ?
9 Aug 2016 by Joshi, Rushikesh
Get Angular Watcher Count in any Browser, just run this script.
15 Sep 2016 by matt warren
Adventures in Benchmarking - Memory Allocations
16 Sep 2016 by matt warren
In my previous post, I talked about some of the general performance lessons that can be learnt from the Roslyn project. This post builds on that and looks at specific examples from the code base.Generally the performance gains within Roslyn come down to one thing: Ensuring the garbage colle
30 Apr 2018 by vudangngoc
A quick comparison of Java 9 Flow API and Lmax Disruptor
19 Dec 2019 by Rick York
A simple, header-only class for high resolution timing
29 Sep 2021 by tugrulGtx
CLOCK caching (LRU approximation) with O(1) cache hit, up to N asynchronous O(1) cache misses
5 Mar 2024 by Dev Leader
Learn how to use BenchmarkDotNet to effectively create and run benchmarks on your C# code. Dig into where you have opportunities to optimize your C# code!
27 Oct 2010 by Andrew Rissing
Technically, the best approach here for speed and flexibility is to do the following:public class TestClass{ private const string EMP_ID = "EmpId"; public void MyTestMethod() { //GetData fetches data from the database using a SQL query DataTable dt =...
5 Feb 2013 by Zoltán Zörgő
Read this comprehensive summary of the choices you have, including their performance aspects: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx[^]
20 Feb 2014 by Philippe Mori
Virtual functions could be faster than a lot of switch/case. On the other hand, often the performance dépends more on the algorithm than the actual language. And with librairies like STL, it is often easier to write efficient algorithm. For example, if you have a bad algorithm written in...
7 Aug 2014 by Zachary Gardner
IE waits till the end of the thread to send AJAX POST requests to the server.
15 Sep 2016 by matt warren
Adventures in benchmarking - performance golf
14 Sep 2016 by matt warren
Stack overflow - performance lessons - Part 1
9 Jun 2023 by Jack Devey
Introducing a lossless compression mechanism for data structured in a table or matrix
22 Jul 2010 by Gregory Gadow
I don't think you can get there from here. As I understand it, code is actually compiled into a Common Intermediate Language (CIL); it is not converted and linked into an executable until the code is actually run. Because a switch statement must be compiled as a single unit, the entire block --...
16 May 2011 by Keith Barrow
With respect to the "main" service class: Although can add static methods to the class but these can't be implementation(s) of web methods. The web service is defined by its Interface and C#/VB won't allow you to implement Interface methods with statics, so you'll get a compile error. For this...
16 May 2011 by Espen Harlinn
Apart from what Keith mentions, there are a few things you can take into consideration.Proper design for a particular purpose depends on leveraging your knowledge about the data model, and the operations that will be performed on the data. There is nothing that prevents multiple threads...
22 May 2011 by Jeremy Hutchinson
Or you can use T4 to generate a static class wrapper around the service. Then your call can look like this:SvcWrapper.Login(username, password);The full explanation and sample code is located here[^].
21 Jun 2011 by Guyverthree
Yes creating and destroying threads do have an overhead, perhaps the better option is to have one manager thread and then have worker thread to which you assign the work to from the manager thread.hence you only create threads at the start of the program and have the wait on a message...
29 Jun 2011 by TRK3
There is no easy correct answer to the question.It really depends on if/whether your threads are ever going to be waiting for i/o (disk access, network, etc.) and how long those waits will be versus the cost of switching threads. If your processor core is only ever going to be waiting...
4 Jul 2011 by OriginalGriff
If you want to know something obscure about performance comparisons, the best thing to do is to check for yourself: that way you get actual numbers to work with. Fortunately, .NET supplies the Stopwatch class[^] for just such events. string[] ar =...
20 Jul 2011 by Sergey Alexandrovich Kryukov
[Answering a follow-up question]As this is C++/CLI, you can use .NET libraries. For performance measuring, use the class System.Diagnostics.Stopwatch as it has much better accuracy (sub-microsecond on most systems). You can inquire if the high resolution operation is accessible and the...
1 Nov 2011 by Mehdi Gholam
Try this : http://stackoverflow.com/questions/450039/how-to-programmatically-get-dll-dependencies[^]The DependencyReporter code will give you a list of the DLL's used by your application.
13 Aug 2012 by Sergey Alexandrovich Kryukov
To answer one part of this question: you need to pass a full path to "java.exe" to the command you use in the batch file. Alternatively, modify PATH environment variable to add the path to this file. If Java is not installed at all, install it.As to the number of users set for Apache JMeter,...
13 Dec 2012 by Sheikh Muhammad Haris
Just create a single Stored Procedure which performs all the Insertions and Selections, and call it in your VB.NET code. It will definitely reduce response time.Dim command As SqlCommandcommand = New SqlCommand()command.Connection = sqlConcommand.CommandType =...
5 Feb 2013 by Member 661293
I'm using same Server.And Two Program(A.exe B.exe).I want process(A.exe B.exe) community.Because I'm Tested PictureBox.if A.exe PictureBox 10ms , B.exe PictureBox 10ms then...Only One Winform Program Tow PictureBox -> 30ms more...But,I can not chose Named Pipe or Shared...
24 Apr 2013 by Sergey Alexandrovich Kryukov
There is no difference at all.If you look with attention what a designed does, you will see that the controls are always added during runtime, even if you develop the page code using the designer. The designer makes no difference, it only assists you in writing code. Just do yourself a great...
19 Feb 2014 by Rakesh Meel
visit here for more...How to Improve ASP.NET Performance[^]ortips-to-improve-the-performance-in-Asp-Net-application/[^]
16 May 2014 by Bartlomiej Filipek
Description of the implementation of my particle container
8 Oct 2015 by CHill60
Firstly make sure you have appropriate indexes on the tables - see your previous post the following is my stored procedure can any one suggest me the improvement of execution time[^]Next - why are you doing the conversions on...
3 Feb 2016 by Rob Philpott
Looks fairly to the point to me. Traditionally, I would try to stay away from byte sized pointers and use something more native (32 or 64) bit and use bit manipulation, to minimize the memory accesses. That said, I don't think it makes much difference on modern day CPUs.Make sure you are...
15 Sep 2016 by matt warren
Coz: Finding Code that Counts with Causal Profiling - An Introduction
27 Dec 2018 by #realJSOP
Write a stored procvedure that does the joins you want, and call it from entity framework. Two things you have to be concerned with, how long a query takes, and how much data it returns. EF ain't exactly the most efficient way to pull data when you're doing join/where.
29 Nov 2022 by Michael Sydney Balloni
This article explores UDP programming, LRU cache development, and .NET packet processing.
17 Mar 2023 by Dev Leader
This article is follow up content to previous articles I've written about iterators and collections, but the benchmark results were NOT what I expected!
10 Jan 2011 by CPallini
I'm pretty confident thatif Process.GetProcesses.Count LastCount Then LastCount = Process.GetProcesses.Count Label1.Text = LastCount end ifWhere LastCount is an Integer variable, member of your class, would perform better. :)
10 Jan 2011 by Espen Harlinn
the property setter for the label probably looks something like this:set{ if(text != value) { text = value; ... // some code to invalidate label causing an eventual repaint ... OnPropertyChanged("Text"); }}if Process.GetProcesses.Count ...
10 Jan 2011 by E.F. Nijboer
When it comes to drawing to screen, checking the need to do the actual drawing is almost always faster than just drawing with the risk it isn't really necessary. This is because the drawing is a very expensive operation. However, it could be that the label component checks this by itself and...
24 May 2011 by Aron Weiler
Performance tests between multiple "multi-key" Dictionary implementations
21 Jun 2011 by Maximilien
(same answer I gave on SO.)It's absolutely normal to see performance difference between a Debug and Release version.The compiler and run-times will do a lot more additional sanity checks in debug version; don't compare one to the other, especially in regards to performance; compare...
21 Jun 2011 by Sergey Alexandrovich Kryukov
Very unreasonable overhead. You should re-think your design totally. There are could be different reasons for using threads. Do you need to more fully use your CPUs/cores (but then you hardly need more CPUs than cores) or thread represent logical entities of your application (such as in the...
29 Jun 2011 by Chuck O'Toole
I follow a couple of rules of thumb, depending on the application type. Assume N is the number of cores / processors / separate CPU execution paths.If the application is "compute bound", that is, mostly computation cycles, then use N threads.If the application is "I/O bound", that is it...
1 Nov 2011 by Sergey Alexandrovich Kryukov
DLLs… what DLLs? What to reference in your WPF application? Why this is a problem? If you can use Visual Studio, just create a new project from WPF Application template. It will create a skeleton application for you. Look at all the references (what you find will be about the minimum, but...
6 Feb 2012 by E.F. Nijboer
It seems that TCP offload is the problem and should be disabled for windows server 2008. Check the link for more info:http://www.appliedtrust.com/comment/2091[^]Good luck!
16 Mar 2012 by Sebastian Solnica
A managed ETW provider and the 15002 error
20 Apr 2012 by Sebastian Solnica
Performance counters are used to provide information how well the operating system or an application, service, or driver is performing.
26 Aug 2012 by Espen Harlinn
From ScottGu's Blog[^]:Massive performance wins are possible with the new Cached Composition feature in WPF 4, which allows applications to cache arbitrary content including live and fully-interactive controls, vector geometry, etc. as bitmaps which persist in video memory. Once cached,...
5 Sep 2012 by Dylan Morley
What you really want to do is implement a decent paging solution. This will solve both your problems, you won't have slow binding times and you won't use lots of server memory by caching larges amounts of data.Humans can't handle 5000 records at once, it's too much information. Opinions...
14 Oct 2012 by OriginalGriff
The simple solution is: Don't do it.Think of it from your user's point of view: You try and find the one item you are looking for in a drop down of 400,000 items.If it simple? Quick? Easy?Provide a popup, or a filter, or something to make their lives easier.What you are proposing...
23 Dec 2012 by austinbox
May want to try googling. But for the most reliable you might have to test yourself...First Result[^]Second Result[^]And don't forget a code project article...CPU Usage with graphical indication using C# .NET[^]
29 Dec 2012 by Zoltán Zörgő
1) First of all, try it!2) As I see, you mix/confuse var with dynamic. And are speaking pointers. But there are not pointers in c#. Actually there are, but not how you think (see: http://www.c-sharpcorner.com/UploadFile/rajeshvs/PointersInCSharp11112005051624AM/PointersInCSharp.aspx[^]). So...
26 Apr 2013 by StianSandberg
Hi.1) Open MMC2) File -> Add/Remove snap-in3) In the list of available snap-ins, locate "Performance", mark it and click add4) Expand the treeview and select "Performance" You will then see the performance graph.5) Rightclick the grapch and select "Add counters"Then a windows opens...
14 May 2013 by CHill60
To improve performance you need to minimise the use of the Excel COM interface.I would suggest converting your list of objects to a datatable first and then exporting that to excel ...Here is a generic way to convert a list to a datatable Converting a List to Datatable[^]and here's how...
14 May 2013 by Maciej Los
If you fetching data from database, the fastest way to export data is to use CopyFromRange()[^] method for MS Excel range.More about: How to transfer data to an Excel workbook by using Visual C# 2005 or Visual C# .NET[^]
19 May 2013 by Abhinav S
You can use this via WMI - http://www.blackwasp.co.uk/GetMemory.aspx[^].
26 Jun 2013 by Sergey Alexandrovich Kryukov
None of the controls are really "static". There is no any runtime difference.Most likely, by "using XML" you meant XAML. XAML merely serves as a data source use to actually generate C# code (or the code in VB.NET or other .NET language) to compile is and to use exactly in the same was as you...
17 Sep 2013 by Anand_Joshi
Performance counters: MultiInstance/MultiCategory.
11 Oct 2013 by ASP.NET Community
The blogosphere is a wealth of real-world tips and tricks for improving your ASP.NET application's performance.Checklist: ASP.NET Performance 
11 Oct 2013 by ASP.NET Community
Here's even more performance tips for making ASP.NET fly.Checklist: ASP.NET Performance  The 2004 Patterns and Practices Book "Improving .NET
24 Oct 2013 by Jochen Arndt
For each block of data you are sending from the client to the server, your server answers by sending the block number and the client waits for this packet before sending the next block of data. These packets slow down the overall throughput.You may remove them and send one status message...
6 Dec 2013 by Pradeep Gupta
Hi, I have found the one. It is open source It has a quality code with all the necessary validations and authentications. It is perfect website for performance testing. Please try http://www.nopcommerce.com/downloads.aspx[^]
18 Dec 2013 by Maciej Los
Why to close connection, if a few lines down, connection is opened?If oledbcon.State = ConnectionState.Open Then oledbcon.Close()End If'here!oledbcon.Open()Please refer this: OleDbCommand Class[^] and have a look at code sample at the bottom of page.
28 Feb 2014 by OriginalGriff
We can't say.You need to look at your code within the loop, and work out what it is doing, and what is taking time.We can't. That's like calling up a garage and saying "My car will only do 30" and expecting them to solve your problem from just that. They don't know if you have tried...
12 Mar 2014 by Raul Iloc
1.The Viewstate is a cache saved into the Web Page itself, is used mainly to preserve data between page postbacks and will be automatically lost when you redirect to other page.2.The Session is a cache associated with each user that access a web application, so it exist at the user level for...
13 Mar 2014 by JoCodes
Good comments provided by Raul. Just wanted to reiterate that avoid Session being used for storing Dataset which contains large number of Rows. Always remember that, Session is User specific, and if we store large data it stores and holds it separately for each User consuming the Server...
1 Apr 2014 by Shajee Afzal
Guys I have developed a ticket management system in C# windows forms application. Now this is the first time I have developed any application that might be used in real world (my school may implement it).As my school is not that rich and mostly run by charity, so the technology they use is...
12 Jun 2014 by Amol_B
Thanks Muli G for sharing link.MSDN link[^]
2 Aug 2014 by Bartlomiej Filipek
How to start optimizing the particle system code.
13 Aug 2014 by OriginalGriff
The solution is simple: don't try to load any UI element with that many items.Think about it: how you like to use that software and try to find the one selection you need to use in a list of 200,000 other ones? Every day? Probably several times every day?If I tried that, my users would...