Skip to main content

Questions tagged [efficiency]

Use this tag in reference to comparing the efficiency of various systems or algorithms, or methods to measure efficiency. Big O notation is more related to complexity, but could affect efficiency.

8 votes
9 answers
6k views

I am developing projects for my private use and have been wondering how I should design my projects. I always try to keep the code as efficient and concise as possible and as readable as possible. ...
Imago's user avatar
  • 253
1 vote
2 answers
483 views

I'm working on a module that handles colormaps and I want to make the mapping of pixel to colors as efficient as possible. It is a performance critical section of our app. Our current solution works ...
glades's user avatar
  • 493
24 votes
6 answers
9k views

What is considered better practice? Case 1: if n == 0: doThis() elif n < 0: doThat() elif n > 0: doSomethingElse() Case 2: if n == 0: doThis() elif n < 0: doThat() else: ...
Nikhil Kumar's user avatar
0 votes
4 answers
384 views

I generally understand the blockchain framework. I have spent much time learning about how it, potentially alone, is able to provide for a decentralized system. For TRUE/ABSOLUTE decentralization, it ...
Runeaway3's user avatar
  • 173
1 vote
0 answers
147 views

My specific problem is that I have a vertically scrollable window into which I need to place rectangular <div> elements that are locked horizontally and have different widths and heights. ...
Jeffrey P's user avatar
  • 111
0 votes
1 answer
305 views

Related (but different) question: How do you dive into large code bases? I have always worked on small projects where editing a piece of code is easy: you modify the code, you recompile and in a ...
Acerbic's user avatar
  • 69
4 votes
7 answers
8k views

I am currently developing an API that returns JSON structures. One of the domain objects returned is a time series, which is a potentially large list (many thousands of elements) of complex objects. ...
Felk's user avatar
  • 204
-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
0 votes
3 answers
5k views

In a project I am working on we load various entities from the database, do some work then attempt to save the resulting entities. If saving the result is not successful, we return a Result object ...
BakeryD's user avatar
  • 29
-1 votes
3 answers
2k views

I was reading some C++ object-oriented programming notes that mentioned that we should avoid wrapping functions in classes if it is not required, since wrapping 'things' in classes would reduce ...
The Pointer's user avatar
33 votes
4 answers
7k views

I am developing code mainly using Bash, C, Python and Fortran and recently also HTML/CSS+JavaScript. My OS is Ubuntu. Maybe I am exaggerating, but I figured that I kind of spend more time getting ...
Max H. Balsmeier's user avatar
9 votes
12 answers
5k views

I see a lot of reasons to use binary over text-based formats. With binary, I find it a lot easier. I can use fread(data, sizeof(struct DataStruct), 1, fileptr) to read, or fwrite to write data. I ...
Block of Diamond's user avatar
2 votes
2 answers
138 views

When making changes to larger modules in Python, this is my current (inefficient) process: Make needed change to code Run program to test (using pdb - python3 -m pdb path/to/script.py Program will ...
JoseMMC's user avatar
  • 129
3 votes
3 answers
236 views

I have a big backlog of tasks gathered during last years. And new tasks are added occasionally. All tasks have the same priority and tasks never expire over time. I was thinking of the reasonable way ...
mnaoumov's user avatar
  • 155
1 vote
1 answer
885 views

Take the following statement for example: 'Get results for ALL Active students of a Course'. Naturally, this query has 2 parts, Get all active students of the course. Get results of those active ...
Jahirul Islam's user avatar

15 30 50 per page
1
2 3 4 5
13