Questions related to improving application performance.
3
votes
1answer
28 views
JavaScript/jQuery - How do I improve this js code/ refactor
I want to know how can I improve this piece of js with respect to best practices/performance.
JS code:
var treeGroupTypes, treeType, leftLeafClass, rightLeafClass;
treeGroupTypes = ...
1
vote
0answers
37 views
Faster way to update/create of a large amount of records?
In our Rails 3.2.13 app (Ruby 2.0.0 + Postgres on Heroku), we are often retreiving a large amount of Order data from an API, and then we need to update or create each order in our database, as well as ...
3
votes
3answers
60 views
How to improve this Javascript/jquery code for any limitation?
I have the following code below and i am trying to improve it:
how can I know, if there is any limitations/drawbacks writing this way and why? any possible error conditions?
What can be improved ...
1
vote
0answers
20 views
Multiple purpose-specific setintervals or a single super interval [migrated]
For code practice and improvement purposes I am writing a simple game (currently writing it generic enough to be a game engine).
I currently have numerous setInterval calls running, namely each ...
0
votes
1answer
34 views
Performance issues with Trinomial Tree to calculate price of option
A program I wrote isn't performing quite to where I had hoped so I went looking to find where the majority of the time of the program was being spent and it was in the function below so I would like ...
1
vote
2answers
93 views
how to reduce execution time and complile time of this program?
I have one programming question
and what did i try:
public class Trigonometric_Ratios
{
int factorial(int number)
{ int result = 1;
for (int i = 1; i <= number; i++)
{
result ...
1
vote
2answers
52 views
Java - Unbounded, High-performance(?), Generic, Thread-Safe(?), BatchedCircularQueue
This is my first CodeReview question. I think I'm doing this right...
Anyway, this is a data structure I wrote:
It is an circular first-in-first-out queue (a ringbuffer);
It has batched ...
1
vote
0answers
30 views
Correct use of my JOIN and arrays to fetch the data?
After learning a lot about programming, I've decided to write some code pertaining to scripting and use of different functions. I've come to a point where I'd like others to verify my code for ...
0
votes
2answers
81 views
How can I optimize this code that finds the GCD?
int count;
int gcdCount;
int testCase = 5;
while (testCase > 0)
{
int n = 5;
count = 0;
gcdCount = 0;
// to get two random numbers a and b a<=n and b<=n
//get probablity ...
2
votes
1answer
87 views
Fastest StringToLowerCase()
I want to optimize the following code:
#ifdef USE_SSE
#define STRING_PREFETCH_TBL(ptr) \
_mm_prefetch(ptr, _MM_HINT_T0); \
_mm_prefetch(ptr+64, _MM_HINT_T0); \
...
0
votes
4answers
85 views
Improving Lottery Simulation
I'm working on a project for an Intro to C/Python class and am looking to improve the efficiency of the program. The program is a lottery simulation where the user inputs the number of tickets they ...
1
vote
3answers
185 views
Is this C code optimised?
char* Migrated[]={"026","109"};
int isMigrated(char* codeB)
{
int i;
int n=sizeof(Migrated)/sizeof(*Migrated);
for(i=0;i<n;i++)
{
if(strcmp(Migrated[i],codeB)==0)
...
3
votes
4answers
146 views
How to optimize these nested loops for better performance
I need to optimize this code so it can execute faster, even if that means using more memory
for (int t = 0; t < Clientes[0].ChildNodes.Count; t++)
{
for (int i = 0; i ...
1
vote
1answer
158 views
Faster way to convert DataTable to List of Class
I am using ExcelDataReader to import an excel file to a dataset. Example Excel table below:
//ID Name Display Order Active
//1 John 1 1
ID, DisplayOrder and ...
3
votes
2answers
54 views
Improving Trie Implementation
This is an implementation of a trie, that I will be using on a code editor to parse keywords from a given programming language. I decided to use a trie when I asked this question, and the ...