Questions related to improving application performance.

learn more… | top users | synonyms

4
votes
0answers
33 views

Haskell Particle Simulation

I recently started learning Haskell and as my first project I decided to port a particle simulation I had written in C. The simulation is pretty simple. We have a cubic box with particles (spheres) ...
2
votes
1answer
65 views

Linq query performance improvements

As I am getting my Linq query to a functional point, I start looking at the query and think about all the "ANY" , and wonder if those should be a different method and then I have data conversions ...
1
vote
2answers
68 views

Performance: Devide group of numbers into two groups of which the sums are equal

I have a piece of code that devides a group of numbers into two groups of numbers of which the sums are equal. I created this because of a stackoverflow question: ...
0
votes
0answers
45 views

How to make the code more optimal?

Maybe some of you have an idea how to make the code more optimal? This had to be a little faster, because i cant pass few time tests :/ Unfortunately I can not add tests whose over time because they ...
3
votes
1answer
45 views

Selecting element from a collection based on bitwise-and result

I need to improve this section of code: uint32_t to_handle = 0; uint32_t test_const1 = Constraint3::VAL1 + Constraint3::VAL2; uint32_t test_const2 = Constraint1::VAL2 + ...
1
vote
4answers
92 views

improve this code for pattern

my aim is to design a function with arguments(int m,int n) so that output is like (for m=3,n=5) 3 34 345 34 3 i came up with this code void func(int m,int n) { for(int i=1;i<n-m+2;i++) { ...
4
votes
2answers
167 views

How can I memoize or otherwise optimize this code?

The code checks many more conditions like the one below. I was thinking to memoize it, but I can't think about how (writers block). How else could I optimize this? I know it seems silly, but my code ...
2
votes
0answers
58 views

Very fast query selector — did I miss something?

A few months ago, I wrote a query selector that seems to outperform the query selectors in the popular GP libraries by a pretty hefty margin. I'm wondering if I overlooked something; it seems odd that ...
6
votes
2answers
256 views

Speed up solution to Project Euler problem 75

I've been programming for a few months now, and have used Stack Overflow a great deal, but this is my first post. Anyway, I wrote this code for Project Euler problem 75, and was curious if anyone knew ...
2
votes
2answers
77 views

Improving the CRC code with “unsafe features”

I have the following CRC 16 code. Is it possible to improve the performance of the code with unsafe constructs. My knowledge about pointer arithmetic is rather limited. public enum Crc16Mode : ...
4
votes
2answers
162 views

Is there a better way to consume an ASP.NET Web API call in an MVC controller?

In a new project I am creating for my work I am creating a fairly large ASP.NET Web API. The api will be in a separate visual studio solution that also contains all of my business logic and database ...
1
vote
1answer
40 views

Please Review Performance Test and Idea: Initialize a widget

I want to extend an app object with a widget that initializes itself immediately. Immediately-Invoked Function Expression: var app = {}; (function() { app.widget = { init: function() { ...
6
votes
2answers
116 views

Generic wrapper for equality and hash implementation: Is there a way I can make it more efficient?

I was writing an answer in another thread and came across this challenge. I'm trying to have a generic class so that I can delegate the routine (and tiring) Equals and GetHashCode implementation to it ...
1
vote
2answers
94 views

What could I have done better with this code from a calendar?

I was writing a calendar a long time ago and, coming back to the code, I've realized that it's not the best. I was fairly mediocre at programming back then. I'm using jQuery, Mousetrap, and ...
3
votes
2answers
109 views

Optimizing unboxed array operations in Haskell

Consider this simplified code which successively permutes array elements: import Data.Word import Data.Bits import Data.Array.Unboxed import Data.Array.Base import Data.Array.ST test3 :: UArray Int ...

1 2 3 4 5 18
15 30 50 per page