performance

What is a simple example of replacing c code with assembly to improve performance?

I've heard that game developers will sometimes replace parts of inner loops w/ assembly code to improve the performance. What is a simple example of this? Where does the assembly go? Just inline w/ the c code? Thanks! Edit: a code sample is greatly appreciated. ...

How to sort nearly sorted array in the fastest time possible? (Java)

I have an array of values which is almost, but not quite sorted, with a few values displaced (say, 50 in 100000). How to sort it most efficiently? (performance is absolutely crucial here and should be way faster than O(N)). I know about smoothsort, but I can't find Java implementation. Does anyone know whether it is already implemented?...

Perl: write speed mystery?

How can the output rate be higher than hard disk write rate? Update 1: I have changed the following: Turned off antivirus. No change. Inserted new physical disk and used the first partition for the test. (The disk for the initial test was on the last partition, separate from the system partition, but on the same physical disk.). Resul...

Delay rendering of dom element when changing properties

I've currently run into a performance problem when updating properties on lots of dom elements at once. It seems that each time I change a property the dom element gets re-rendered. Is there anyway I can delay the rendering of the elements until all of my updates have taken place? It seems to be a lot slower in FF 3 & 3.5 than IE 7 & 8 w...

In Oracle performance monitoring why does Scheduler activity goes up

What does scheduler mean in Oracle? Is it connection scheduling or query scheduling or the query plan execution scheduling or something else? ...

How does row design influence MySQL performance?

I got an users table and some forum, where users can write. Every action on forum uses users table. User can have a profile, which can be quite big (50KB). If I got such big data in each row wouldn't it be faster to have separate table with user's profiles and other data that aren't accessed very often? In an online RPG game each charac...

SQL massive performance difference using SELECT TOP x even when x is much higher than selected rows

Hi All, I'm selecting some rows from a table valued function but have found an inexplicable massive performance difference by putting SELECT TOP in the query. SELECT col1, col2, col3 etc FROM dbo.some_table_function WHERE col1 = @parameter is taking upwards of 5 or 6 mins to complete. However SELECT TOP 6000 col1, col2, col3...

.NET RegEx Performance vs. C++

Is there any published benchmark results about RegEx performance in .NET vs. unmanaged C++/C? ...

Use of MD5(URL) instead of URL in DB for WHERE.

I have a big MySQL InnoDB table (about 1 milion records, increase by 300K weekly) let's say with blog posts. This table has an url field with index. By adding new records in it I'm checking for existent records with the same url. Here is how query looks like: SELECT COUNT(*) FROM `tablename` WHERE url='http://www.google.com/'; Curren...

Can layered subqueries spanning multiple tables reference a parent query?

I have three tables setup: POSTS, DISCUSSIONS, and COMMENTS. The layout is as follows: POSTS id | user_id | title | body | created DISCUSSIONS id | post_id | user_id | title | body | created COMMENTS id | post_id | discussion_id | user_id | title | body | created A post hasMany DISCUSSIONS, which then hasMany COMMENTS. What I need ...

Android Draw Time

Whats a Good Draw Time? Im getting around 30-35 MS when i look at it in HeirchyViewer ...

What makes a JavaFx 1.2 Scene Graph Refresh?

My first question =). I'm writing a video game with a user interface written in JavaFx. The behavior is correct, but I'm having performance problems. I'm trying to figure out how to figure out what is queuing up the refreshes which are slowing down the app. I've got a relatively complex Scene Graph that represents a hexagonal map. It s...

Performance Testing fundamentals

Hi. I have some basic questions around understanding fundamentals of Performance testing. I know that under various circumstances we might want to do - Stress Testing - Endurance Testing etc. But my main objective here is to ensure that response time is decent from application under a set of load which is towards a higher end or in leas...

Increasing WPF ObservableCollection performance

At present I have two WPF listboxes imitating the following functionality I am using 2 ObservableCollections to allow users to select whatever items they require (flexibility is the key here). The main issue is that I have thousands of items that are grouped in both listboxes. All in all the design works really well (with a few dozen ...

Drupal development: performance

as the single user / developer on a drupal website im experience serious performance problems. several issues occur: usually i develop drupal on our company dev server but now im at a client's office. the IT guys installed a VM with WAMP on the server they usually use for .net development. on the first day of dev (installing drupal, re...

What to avoid for performance reasons in multithreaded code?

I'm currently reviewing/refactoring a multithreaded application which is supposed to be multithreaded in order to be able to use all the available cores and theoretically deliver a better / superior performance (superior is the commercial term for better :P) What are the things I should be aware when programming multithreaded applicatio...

What are the advantages of using named queries under Hiberante Annotation

Are there any advantages of using named queries vs what we have? Looking at performance, usability, maintainability etc etc.... In our application we have defined our queries as such: private static final String SELECT_CODE_FOR_STORE = "select DISTINCT code from Code code " + "join code.codeDescriptions codeDesc " + "j...

glassfish hosting

I will need to develop/deploy an EAR (webapp + ejbs, webservices) and its the time to know 'where on Internet?'. this Ear is a simple webapp jsf + ejbs 3, webservices. app: affiliations system for who: health sector users: aprox 2000 users are going to hit (get affiliated) to the app, aprox only 50 simultanely. server: sun glassfish v2 ...

Performance lost when open a db multiple times in BerkeleyDB

I'm using BerkeleyDB to develop a small app. And I have a question about opening a database multiple time in BDB. I have a large set of text ( corpus ), and I want to load a part of it to do the calculation. I have two pseudo-code (mix with python) here @1 def getCorpus(token): DB.open() DB.get(token) DB.close() @2 #ope...

IE6 performance issues with adding className on multiple elements (jQuery tableHover plugin)

In an application I write that uses a large HTML table of numbers the design requires that the row and column of the hovered cell will be highlighted. I develop all the JS for this project using jQuery 1.3.x, and I found the tableHover plugin that does exactly what I need. But: on IE6 the performance of this plugin drops down as the n...