Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [speed]

The tag has no usage guidance.

1
vote
2answers
148 views

What are the bottlenecks for the Java build speed?

Which underlying system parameters have most influence on how fast a typical Java project (say dozens of classes and dependencies) builds? There is a lot information on JIT (bytecode to CPU ...
2
votes
3answers
223 views

What's faster.. Multiple variables or single array? [duplicate]

I have a C-coded function that realizes a very long calculation on a microcontroller. I try to optimize it for speed at the moment. The function content is created automatically using Mathematica. It ...
106
votes
15answers
14k views

When to optimize for memory vs performance speed for a method?

I recently interviewed at Amazon. During a coding session, the interviewer asked why I declared a variable in a method. I explained my process and he challenged me to solve the same problem with fewer ...
-1
votes
1answer
132 views

Executing an algorithm constantly on slow and fast machine

Is it possible to create an algorithm that will execute at the same rate and speed on faster and slow computers. What i mean is, i have a year 2000 desktop that can run a certain computational ...
0
votes
2answers
71 views

I have two different account types that can do different things in a Single Page Application. Should I turn it into a Multiple Page Application?

In my new SPA (Single Page Application), I have teachers, which can make tests, and students, which can take tests, subscribe to teachers, and view their grades. This means that in JavaScript, they ...
-1
votes
1answer
183 views

What is the SLOWEST 32 hashing function without excessive collisions

I am currently using a CRC32 hash to generate a locality sensitive hash for some of my data. For much the same reasons as PKBDF2 makes a better choice than, say, SHA26, for hashing passwords I ...
6
votes
3answers
2k views

Effecient algorithm for data deduplication in procedural code

I have written a data cleansing application which, for the most part, works well. It is not designed to handle large volumes of data: nothing more than about half a million rows. So early on in the ...
1
vote
1answer
73 views

Quick wireless transmission

I'm looking for a way to send a signal between a raspberry pi and a smart phone. What I want to do is hash a few basic bits of information about the phone to use as a UUID. I then want to transmit ...
2
votes
5answers
225 views

Algorithm to limit the speed of processing items

I need to process a large number of data items, and I need to restrict the speed at which they are processed. For example, not more than 20 items per minute. I've thought about an algorithm for that, ...
0
votes
2answers
246 views

How to calculate how much of the CPU is used?

Say we have an interrupt that is generated once each time that 1024 bytes of network traffic arrives. Each interrupt takes 3.5 microseconds to process and the network speed is 100Mb.We want the ...
-1
votes
4answers
1k views

how to speed the random access of 2D array? [closed]

arr[2^30][100000] for (int i = 0; i < 2^28; i++) { value = a*b+c;//only a example. In all, value is an integer. arr[value][arr[value].length++] = i; } My code like above. Random access a ...
15
votes
6answers
9k views

How important is memory alignment? Does it still matter?

From some time now, I have searched and read a lot about memory alignment, how it work and how to use it. The most relevant article I have find for now is this one. But even with that I still have ...
2
votes
2answers
332 views

.Net speed vs Custom Code speed

In an int?[] garunteed to have original values, I wanted to find the index of null, which will only be a single index. I drilled into the Array.IndexOf(T[] array, T value) .NET and, after all of the ...
4
votes
4answers
275 views

Selecting a CPU or microcontroller needed for a given software application?

Say I had a software algorithm (for example, an FFT), and I need it to process (n) amounts of data in (t) milliseconds. This is a real-time task written in C. There are a lot of CPUs out there, and ...
-2
votes
2answers
566 views

How to know if I'm slow or fast at programming?

I understand that it's extremely depends on a particular case, but I really would like to know at least roughly how long a specific task can take for completion to average programmer. Is there any ...
0
votes
1answer
1k views

Speeding up appending text in C# [duplicate]

I'm trying to append text to a large amount of strings (in the thousands), and also do some other string manipulations. However, I have about 60 lines of if/else and string appending and it takes ...
1
vote
3answers
200 views

Pre-calculate values or not on Raspberry Pi

Say that you want to rotate something 360 steps 100 times. You now have a choise to pre-calculate 360 sin and cos values once and then use the stored values 100 times, or you can calculate sin and cos ...
1
vote
2answers
196 views

Are websites hosted in distant servers slower?

I live in Brazil and I'm planning on hosting my website in either DreamHost or Digital Ocean, which don't have any servers in my country. Will that affect the loading speed of my site? Thanks!!!
2
votes
1answer
145 views

Closest Point to Moving Target

I have a target which is constantly moving, and only its current position is ever known. I also have about one hundred objects surrounding it, and for each of these only the current position is known....
5
votes
2answers
344 views

Bottleneck performance in ECS

I've been looking into building an entity-component-system. Basically, an entity is just an id wrapped around a struct, components are data belonging to that entity(and reference said id), and systems ...
1
vote
3answers
303 views

Including extra headers that I do not really need

I always wondered what are the effects of including not needed headers to the final executable once compiled. In my code some times I may included many different headers that I do not need (or I used ...
-1
votes
2answers
1k views

Loading database in memory vs querying

I am currently developing a continuous backup software. The key feature of the software is instant backup meaning that each time a file is created, modified, renamed or deleted the change is ...
2
votes
2answers
5k views

Is creating and writing to one large file faster than creating and writing to many smaller files in Python on Linux?

If using Python on a Linux machine, which of the following would be faster? Why? Creating a file at the very beginning of the program, writing very large amounts of data (text), closing it, then ...
2
votes
4answers
940 views

Optimizing code by using registers, but what if they are not enough in number?

One way to optimize code is to minimize the access to arrays and use variables instead, because that way we use registers instead of loading data to cache memory. For example, if in a loop I'm going ...
0
votes
2answers
385 views

Large csv's to html report

I am working on a web front end + front end services. I receive good sized csv files (10k lines). My service processes them and condenses them into one larger csv file (up to 300k lines). This ...
1
vote
1answer
430 views

Can we still consider that Moore's law still holds true regarding the consequence on CPU speed? [closed]

Moore's law is an empirical law and in simple terms states that the number of transistors on integrated circuits doubles approximately every two years. One of the consequences of Moore's law is that ...
0
votes
0answers
52 views

Dedupe while or after write

I have a summary tool written in python that reads input files, and writes them into a summary file. I have the following stipulations: No duplicates. If it exists, add a count to it. Is it better ...
3
votes
2answers
697 views

How can I approach creating an efficient algorithm for maximizing value with these specific constraints?

I'm having trouble coming up with an approach that isn't n^2 for this problem. Here's a contrived, simplified version I've come up with: Let's say you're a company that needs 4 employees to launch in ...
2
votes
4answers
244 views

Does boostrapping limit the achievable speed of the new compiler?

I have a good grasp on how the C compiler was boostrapped from itself and how that must have been very efficient, since the first pre-bootstrapping version was written in assembler, which is as low ...
2
votes
3answers
2k views

Optimal way to implement this specific lookup table in C#?

I want to create a lookup table for this data: The "input variables" (what is used to "lookup") are 4 different doubles that can each take on 1 of 200 numbers (the numbers range from 1-1000 but there ...
-1
votes
1answer
1k views

Increase speed of a VB.net Application to SQL server 2008 and Hamachi VPN [closed]

Our current Information System (complete with path for pictures for records stored in db) has the following specifications: A desktop application was developed in vb.net We use SQL server 2008 r2 as ...
3
votes
3answers
6k views

Best way to choose random element from weighted list

I want to create a simple game. Every so often, a power up should appear. Right now the different kinds of power ups are stored in an array. However, not every power up should appear equally often: ...
1
vote
3answers
1k views

Add javascript to all pages (for caching), or only to the pages that require the scripts (for a smaller page size)?

I'm using bits of javascript on my website for an image gallery, smooth scrolling, etc. These scripts are not used on every page (not every page has an image gallery for example). However, the scripts ...
3
votes
1answer
271 views

Processing every leaf under a node in a tree efficiently

Short version: In a tree (non-binary) with many levels of children, where each node can have multiple leaves, what is the best way to tally leaves that meet a certain condition given a node? Long, ...
22
votes
2answers
20k views

SQL IN() versus OR

I was working with a query I wrote today had to change the code from the WHERE clause to use a IN(list of stuff) filter instead of using something like item_desc = 'item 1' OR item_desc = 'item 2' OR ...
7
votes
1answer
313 views

Hardware that accelerates pointer dereferencing?

Most modern languages make a heavy use of pointers / references: a typical OOP language uses VMT lookups, a typical functional language builds key data structures out of pointers, etc. Even typical C ...
0
votes
5answers
202 views

Question regarding Readability vs Processing Time

I am creating a flowchart for a program with multiple sequential steps. Every step should be performed if the previous step is succesful. I use a c-based programming language so the lay-out would be ...
13
votes
2answers
2k views

Object oriented vs vector based programming

I am torn between object oriented and vector based design. I love the abilities, structure and safety that objects give to the whole architecture. But at the same time, speed is very important to me, ...
1
vote
3answers
92 views

Assuring Quality and Bug Fix speed in Open Source Python Project

I'm maintaining an open source framework (in Python on *nix platforms if that matters) for the first time in my life. It is pretty much pre-alpha, not much more then a scientific proof of concept, yet....
1
vote
1answer
1k views

Using assembly to write to a file

I am working with a trading application (reading data from the exchange) which generates a bucket load of data on a per second basis. We have different "log-levels" but even the minimal log-level ...
4
votes
3answers
5k views

Is it conceivable to have millions of lists of data in memory in Python?

I have over the last 30 days been developing a Python application that utilizes a MySQL database of information (specifically about Norwegian addresses) to perform address validation and correction. ...
4
votes
1answer
733 views

How does having assets saved on a secondary domain(s) reduce the load time of the website?

I went for an interview yesterday where I was asked this question: "How does having assets (images/videos) stored on a secondary domain (assets.example.com) reduce the load time of example.com?" ...
2
votes
1answer
111 views

File Processing Times

I have a very simple program in Ruby that opens a dictionary file, sorted-words.txt and prints out all the words in pig-latin. I tested its speed, and the first time I ran it, the program finished in ...
17
votes
6answers
18k views

PHP and performance

I always hear that PHP is for medium and small websites whereas .NET and Java for enterprise applications. My question is about PHP. Why is PHP not a good option for enterprise web applications? Is it ...
15
votes
5answers
4k views

Resources on Writing Efficient C Code for Micro-controllers? [closed]

Serious help needed here. I love programming. I've been reading bunch of books(such as K&R) and articles/forums online for C language lately. Even tried looking into Linux code(although, i was ...
1
vote
5answers
14k views

Is Bubble Sort the slowest sorting algorithm? [closed]

Is bubble sort the least Big-O efficient? If the answer is no, then what is the least efficient sorting algorithm?