Skip to main content

Questions tagged [optimization]

Optimization is the process of improving an existing program to make it work more efficiently or/and using less resources. Remember this site is only for conceptual questions, so please ask only conceptual ones about optimization. If you want your specific code to get optimized, better ask the question on StackOverflow or CodeReview.SE.

Filter by
Sorted by
Tagged with
13 votes
5 answers
2k views

I'm currently analyzing a process that is considered too slow. In summary, it's a task that loads a lot of data from Microsoft SQL Server, performs some basic stuff on it, and creates a report. It ...
Arseni Mourzenko's user avatar
1 vote
1 answer
152 views

Problem Match prioritized tasks with suitable workers. Details Consider a task with following properties - type and size. Based on task type, tasks are prioritized. While a worker has following ...
Ammar's user avatar
  • 123
3 votes
3 answers
629 views

What are things that newer CPU can do to speed up single thread execution? multiple registers? (can compilers always benefit from it?) SIMD? (do compilers use SIMD without code annotation?) does a ...
jokoon's user avatar
  • 2,280
0 votes
4 answers
209 views

I was writing a procedure that is only applicable in a particular case, but it didn't feel right to enforce it by contract or raising exceptions, because there's no problem with calling it in other ...
Devsman's user avatar
  • 601
0 votes
3 answers
197 views

Im am developing a logistics application and at the moment, I try to solve the following problem: In the system, there are multiple machines. Each machine has one or more skills. For example, machine ...
pschill's user avatar
  • 2,040
0 votes
0 answers
51 views

I am looking for feedback on a design problem I encountered when processing batches of db entries. The issue at hand is efficiency and throughput of an application. The application looks like this ...
Samuel's user avatar
  • 769
15 votes
4 answers
5k views

Lets say I have students and classes which are 2 entities. A student can take many classes and a class can have many students. This would be a many to many relationship. To solve this with an RDBMS my ...
Jeremy Fisher's user avatar
0 votes
1 answer
595 views

I've just accidentally came across this answer about inlined functions and I'd like to know how this affects call stack. But I can't add comments because I don't have enough rep so I decided to ask ...
b3rry's user avatar
  • 3
2 votes
2 answers
407 views

I'm working on an embedded C++ project that involves logging certain types of statistical data (like successful accesses, failed attempts, and other events) to the flash memory (just incrementing ...
Dario.Casciato's user avatar
8 votes
3 answers
270 views

First question here, so preemptive apologies if I've committed some faux-pas. Additionally, I am aware that this question is about possibly the micro-est of micro-optimizations ever, and "micro-...
Da Spud Lord's user avatar
7 votes
4 answers
3k views

Here I'm working in Python, but it's more of a language agnostic question, unless specific language features makes it clear that an option is better than the other. I get my raw data from a REST API, ...
L'Animal Fou's user avatar
0 votes
1 answer
180 views

I have an array of entities which have an id property: entities: {id: string|null}[] = []; All items in the array are guaranteed to have id !== null and the array will not exceed 100 items. Now I may ...
lampshade's user avatar
  • 103
0 votes
1 answer
619 views

I'm thinking of a designing a review system (restaurant, hotel etc) where users can drop star reviews. Typically in a such a application, you can see the average rating of an entity along with all ...
Ahmed Sadman Muhib's user avatar
0 votes
3 answers
4k views

I'm working on an application with a database containing many recipes. The API is written in Django (with Django REST Framework) and frontend in React.Each recipe is assigned a high-quality image. In ...
gandalf113's user avatar
0 votes
0 answers
57 views

In my town, recently a delivery company has been opened (think DoorDash but on a much smaller scale and only doing local deliveries). Now what really confuses me is that they charge pennies for each ...
Freshman's Dream's user avatar
3 votes
1 answer
2k views

Is there any performance detriment to assigning variables vs using them inline. I'm guessing this WOULD be worse if a method was returning primitive and I was 'boxing' it (e.g. method returning int, ...
nanotek's user avatar
  • 341
1 vote
1 answer
2k views

I have a jar file, for example foo.jar. My code contains a lot of libraries (almost 75 jar dependencies). I am not using anything like maven or gradle, I'm just using pure java with pure jar files as ...
Day Trip's user avatar
-3 votes
1 answer
106 views

I'm working on a CSS library that includes hundreds of selectors and rules for quick templating instead of writing regular CSS. This is used as a replacement of attr() CSS function until it works for ...
Tot's user avatar
  • 147
-2 votes
1 answer
394 views

I'm developing an application that will show some weather information based on the user's location. Since the weather forecast is just a very small feature of the app that complements the main ones, I ...
Cornwell's user avatar
  • 117
-1 votes
1 answer
94 views

While writing python code (I write python-selenium for GUI automation), I am facing situations wheer I have to deal with 5 widgets that do the same thing, just there xpath is differs by one term. # ...
Ulysses's user avatar
  • 101
-1 votes
1 answer
46 views

v = |x1-x2| with 0<=xj<=C for j=1,2, C constant I was trying to moel this relation by linear constraints. This is what I've done equality is equivalente to superior and inferior relation. ...
Ayman's user avatar
  • 1
1 vote
4 answers
319 views

I'm currently working on an program that solves a graph optimization problem. I know the "standard" software-design principles like information hiding, modularization, etc. What I'm ...
Moritz Groß's user avatar
0 votes
2 answers
243 views

I have several drawings from SVG files which basically contain basic outlines of figures. They are constructed in segments of various shapes (lines, ellipse arcs, Bezier curves ect.) Something like ...
DrDress's user avatar
  • 127
-2 votes
1 answer
588 views

I have following code snippet void func(int row,int n,std::vector<int>& buffer){ if(row>n){ return; } std::vector<int> new_buffer; for(int elm : buffer){ ...
ShayakSarkar's user avatar
2 votes
1 answer
242 views

I have a new site that allows you to play sounds of letters on click. Each letter produces a separate sound. I went from roughly 500kb for .wav files to around 30kb for each sound file. That's a lot ...
Lance Pollard's user avatar

1
2 3 4 5
9