performance-comparison

C++ function parameters: use a reference or a pointer (and then dereference)?

I was given some code in which some of the parameters are pointers, and then the pointers are dereferenced to provide values. I was concerned that the pointer dereferencing would cost cycles, but after looking at a previous StackOverflow article: http://stackoverflow.com/questions/431469/how-expensive-is-it-to-dereference-a-pointer-in-c...

Deploy view or use function for lookup

I've two master tables Org & Item and then there's an OrgItem table.I have to fetch ItemCodes for a particular Org. TABLE STRUCTURE: Org ( Id, OrgCode, Name) - Org Master table Item ( Id, ItemCode, Name) - Item Master table OrgItem ( ItemId, OrgId, ItemCode) - Some Org specific ItemCodes Now only some Item's have Org specific Item...

What's a good multi-core 64-bit "Hello World" program?

I recently got my home PC upgraded to a quad-core CPU and 64-bit OS. I have some former experience with C/C++ and I'm really "itching" to try exercising some 64-bit CPU capabilities. What's a good "Hello World" type program that demonstrates 64-bit multi-core capabilities by doing some simple things that don't work well at all in 32-bit ...

Declare converters in the application.xaml or in individual files?

What should be the best practice to declare the converters: Declare ALL my converters in the app.xaml (i.e. in <Application.Resources/>) so it's available in the entire application. Declare on each Page/Window/ResourceDictionary/DataTemplate etc. at its Resources section, the converters I need on this page. You tell me... That's for ...

Performance of 32-bit integers in a 64-bit environment (C++)

We've started compiling both 32- and 64-bit versions of some of our applications. One of the guys on my project is encouraging us to switch all of our 32-bit integers to their 64-bit equivalents, even if the values are guaranteed to fit in a 32-bit space. For example, I've got a value that is guaranteed to never exceed 10,000 which I'm...

C# Sort and OrderBy comparison

I can sort a list using Sort or OrderBy. Which one is faster? Are both working on same algorithm? List<Person> persons = new List<Person>(); persons.Add(new Person("P005", "Janson")); persons.Add(new Person("P002", "Aravind")); persons.Add(new Person("P007", "Kazhal")); 1) persons.Sort((p1,p...

Speed of programming languages then and now.

Speed is an important part of choosing a programming language. Apparently, C++ is(for most people) the undoubted ruler when it comes to speed. Yet when asked with evidence to back this up, nothing can be offered. Usual excuses include: It's faster than Java There are so many blogs saying it, it must be true. It's the language I've le...

Implicit VB performance question

Sometimes I have to implement an interface or inherit a virtual (MustInherit) that the base method expects an object, whilst I know that the value I will be passing will always be an Integer for example. What should be the best performance from the examples below: Public Sub DoSomething(ByVal obj As Object) 'option 1: Dim x As ...

Computed columns: SQL or Locally in Entity Framework?

Hello! I have some computed-columns of two types: Computed columns based on columns in current table (i.e. Price * Tax) Computed columns based on other columnes (i.e. Price * fn_GetTax(OrderId)) Would you say it's better to use these columns in CLR on the client only and then save from the server the calculation and transferring per...

Is DB4O Replication faster than SQL Server Merge Replication?

Does the replication system that comes with DB4O work well? Basically I would like to know if anyone has some good numbers on the record throughput of their replication system and if it handles concurrency errors gracefully or not. What is the relative performance difference between SQL Server's merge replication between two SQL server...

<ContentControl>Content</ContentControl> vs. <ContentControl Content="Content"/>

Given the following two options: <ContentControl>Content</ContentControl> vs. <ContentControl Content="Content"/> Any performance differences? What would you say is more readable? Conclusion? I'm affraid this question might sound somehow babyish, but how will I know if I won't ask, so I decided to shoot it. Comment me if I chose...

In ASP.Net, what is the best way to understand and analyze performance?

Until now, I have not create any massive applications using ASP.Net. However, I am looking to create an application that has the potential to be very performance intensive. So I am looking for some tools or best practices when it comes to performance. I would like to be able to know how to: See my current performance (good or bad) Vi...

OnLoaded vs. Window_Loaded / event handler versus overriding

What's better: Private Sub Window_Closed(sender As Object, e As EventArgs) Handles Me.Closed 'Do stuff End Sub Protected Overrides Sub OnClosed(ByVal e As System.EventArgs) MyBase.OnClosed(e) 'Do stuff End Sub I personally think that the second is better, 1st because it doesn't add a handler, and also because the synta...

At what point is a simple dataset better stored in SQL Server than a CSV file when using ActiveRecord

I have a dataset consisting of roughly 10000 5 field records. I need to be able to retrieve a record based on the value in one field, which is a unique string. Each record will likely only be accessed once or twice. The application accessing the data uses Castle with ActiveRecord, backed onto SQL Server 2005. I recognize that at some p...

Java Efficiency: Object Assignment & Method Call vs. Inline Method Call

I'm working on an application with a 3D viewport which refreshes 30 times a second (or at least tries to render that fast). Unfortunately, the code is complicated enough that simply converting it to test for the performance effect would take quite a while, but the two conditions I'd be comparing are as follows: ObjectToRender p = objec...

How to check how much execution time is spent in different dlls

In my project I have some code which has been deveoped in VBA and it calls functions from different C# DLLs. currently the performance of the code has been degraded and I am planning to check in which function/dll most of the execution time is spent. Kindly let me if any tool is available to check the same. ...

Reducing performance variations on Linux

Hi all, I am trying to benchmark a piece of software that runs on an Intel Pentium with Linux on top of it. The problem is, that I get considerable performance variations during consecutive test runs, when using the RDTSC instruction. Runtimes of exactly the same piece of software vary between 5 million and 10 million clock cycles, so i...

Are there any good Clojure benchmarks?

Edit: The Clojure benchmarks are up on the Benchmarks Game. I have made this question community wiki and invite others to keep it updated. Is anyone aware of benchmarks of Clojure's performance? I have done some of my own (although nothing too formal) and it didn't fair too well in comparison to other functional languages (tried...

Python: Why is IDLE so slow?

Hi, IDLE is my favorite Python editor. It offers very nice and intuitive Python shell which is extremely useful for unit-testing and debugging, and a neat debugger. However, code executed under IDLE is insanely slow. By insanely I mean 3 orders of magnitude slow: bash time echo "for i in range(10000): print 'x'," | python Takes 0.0...

The advantage / disadvantage between global variables and function parameters in PHP?

sorry i'm a beginner and i can't determine how good a question this is, maybe it sounds utterly obvious to some of you. if our use of these two below is the same which is better? function doSomething ($var1,$var2,..){ ... } OR function doSomething (){ global $var1,$var2,..; ... } by our use I mean that I know that in t...