performance-comparison

PHP: is JSON or XML parser faster?

I'm building classes that interface with the Twitter API, and I'm wondering whether PHP's built-in XML or JSON parser is faster? Twitter will send me the same data in either format, so PHP performance will determine my choice. I'm using php_apc, so you can disregard parse time and assume I'm running off bytecode. Thanks! more: I'm jus...

Is there a performance difference between these two pieces of code?

Is there a performance difference between these two pieces of code? My gut feeling is that the second option is slower, as the Cell object has to be constructed each time, but I like the idea of returning a Cell. Option One: //Call to method initiTextDefaultCell(borders); iTextTable.setDefaultCell(iTextDefaultCell); //Other code... p...

How much more performant is Postgres than MYSQL on fulltext search?

I've been a MYSQL user,never tried Postgres . But MYSQL has bottle neck on fulltext search when the data set is huge. ...

Liberty to program

Certain programming languages tend to give you a lot of liberty (C/C++) while others seem to have certain restrictions (C# and Java). Is it better to let programmers have liberty (pointers, destructors, multiple inheritance etc.) or to limit them (garbage collector, etc.)? ...

Linq to XML performance - Standalone test vs Very large web application

So I took a specific hot-spot from a very large web application, that does lot of XML processing (adding nodes, adding attributes to nodes based on some logic), then created a standalone test to mock the same situation using Linq to XML (as opposed to XmlDocument) There was 2 to 10 times performance improvement in the standalone test co...

IN () vs EXISTS () in SqlServer 2005 (or generally in any RDBMS)

I'm trying to figure out which is faster, a clause like "WHERE IN (SELECT 1 FROM MyTable)", or a clause like "WHERE EXISTS (SELECT 1 FROM MyTable). Let's use the query from the SqlServer documentation: SELECT * FROM Orders WHERE ShipRegion = 'WA' AND EXISTS ( SELECT EmployeeID FROM Employees AS Emp WHERE Emp.EmployeeID = Ord...

Performance consideration: Spread rows in multiple tables vs concentrate all rows in one table.

Performance consideration: Spread rows in multiple tables vs concentrate all rows in one table. Hi. I need to log information about about every step that goes on in the application in an SQL DB. There are certain tables, I want the log should be related to: Product - should log when a product has been created changed etc. Order - same ...

PostgreSQL OS suggestion

Hi guys we are on the way to start developing a big web platform. For db server we choosen postgresql. Would you suggest an OS for the postgresql server (we are looking for the maximum performance)? Thanks P.S. sorry for the bad english ...

How to write an entity comparator in C# (with example code of first attempt)

Hi All, I want to know the most efficient way of comparing two entities of the same type. One entity is created from an xml file by hand ( ie new instance and manually set properties) and the other is retvied from my object context. I want to know if the property values are the same in each instance. My first thoughts are to generate...

Performance testing for existing web app - Useful tools?

I'm maintaining a web app that has performance problems. I want to record a series of actions, then play back those actions once I've made changes and compare page load times so that I can quantify the performance improvement. The Selenium IDE does what I need for recording and playing back the actions, but I haven't found an easy way ...

try catch performance

This article on MSDN states that you can use as many try catch blocks as you want and not incur any performance cost as long no actual exception is thrown. Since I always believed that a try-catch always takes a small performance hit even when not throwing the exception, I made a little test. private void TryCatchPerformance() ...

Which one will be faster

Just calculating sum of two arrays with slight modification in code int main() { int a[10000]={0}; //initialize something int b[10000]={0}; //initialize something int sumA=0, sumB=0; for(int i=0; i<10000; i++) { sumA += a[i]; sumB += b[i]; } printf("%d %d",sumA,sumB); } OR int main() { ...

32bit vs 64bit performance

I have a .NET assembly(3.5 framework) and it basically has a set of custom controls which does a lot of things like plotting points and stuff like that. The assembly is compiled as 'AnyCPU' so that I can use it in both 32bit and 64bit. When I tried to compare the performance of an application that uses this assembly in 32bit and 64bit, I...

How to pause Garbage Collection in .NET?

I'm running some performance tests on some .NET code that processes lots of data. I want some tests that ensure the garbage collector isn't influencing my results. How do I temporarily pause the garbage collector? ...

Retrieval performance for k-means and KSOM

In k-means and KSOM (Kohonen's Self Organizing Map), which one gives the better retrieval performance? And how to calculate that performance? ...

Regular Expression vs XML Functions in PHP

Hiya, I currently do alot of data parsing, and have toyed with PHP functions for XML such as simple XML and a few others here and there. But there always seems to be some sort of issue with dealing with them, mainly due to the way the data is presented. The most reliable way i have found is to always just simply use preg_match_all a...

Ajax PageMethods Vs XMLHTTP

Hi guys, i have a case where when the user closes the browser window i have to set an Application Object to null...and for this i will use the JavaScript onbeforeUnload to do the server side work... so i wanted to know which is better XMLHTTP or an ajax PageMethod...which is faster..?? i have used both and found that pagemethods requi...

Target mysql query response times

As I'm looking to optimize some of my mysql queries and improve performance, I'm realizing that I'm just not sure what sort of response times I should be aiming for. Obviously lower is better, but what do you normally target as a 'slow' query for a consumer site? My queries are currently running between 0.00 to 0.70 seconds. I assume...

which cast is faster static_cast<int> () or int()

Try to see which cast is faster (not necessary better): new c++ case or old fashion C style cast. Any ideas? ...

Is C faster than C++?

I've heard many opinions on this subject, but never saw any good proofs that C is faster than C++. So, ...is C faster than C++? EDIT: This is a Runtime comparison. ...