Questions tagged [tradeoff]
44 questions
2
votes
2 answers
Is std::find suitable only for containers whose elements may be not sorted?
We can use std::find on std::set, but it may be slow because std::set has a member function std::set::find that is often faster than std::find.
Is std::find suitable only for containers whose elements may be not sorted, e.g. std::list?
Can…

xmllmx
- 39,765
- 26
- 162
- 323
2
votes
1 answer
Measure the tradeoff between accuracy and speed of algorithms
I have a group of algorithms A, B, C and D. Each of them has a specific execution time and a certain accuracy (MSE). Is there a formal way of calculating the tradeoff between the execution time (speed) and the accuracy?
For example if A has an…

goocreations
- 2,938
- 8
- 37
- 59
2
votes
3 answers
Slow Update vs Slow Select
This is a question about tradeoffs.
Imagine a social network. Each user has a status message, that he can change anytime. Whenever he does change it, all his friends are notified through a wall (like in Facebook).
To make this work. We have 3 tables…

niaher
- 9,460
- 7
- 67
- 86
2
votes
3 answers
Doesn't Passing in Parameters that Should Be Known Implicitly Violate Encapsulation?
I often hear around here from test driven development people that having a function get large amounts of information implicitly is a bad thing. I can see were this would be bad from a testing perspective, but isn't it sometimes necessary from an…

dsimcha
- 67,514
- 53
- 213
- 334
1
vote
0 answers
Trade off between losses?
I have been working on a super-resolution task. I have this question about determining loss function, So in the case of the task at hand I felt like going with SSIM as a loss function to train my model. I did get a good set of results. Recently I…

user14709645
- 11
- 1
1
vote
1 answer
On-the-fly parser/pre-generation space/time tradeoff considerations
Do the space-related benefits of using an on-the-fly parser outweigh the time-related benefits of a pre-generated lookup table?
Long version:
I am authoring a chemistry reference tool, and am including a feature that will automatically name…

Williham Totland
- 28,471
- 6
- 52
- 68
1
vote
1 answer
Trade off between Linear and Binary Search
I have a list of elements to be searched in a dataset of variable lengths. I have tried binary search and I found it is not always efficient when the objective is to search a list of elements.
I did the following study and conclude that if the…

Raghu
- 114
- 2
- 10
1
vote
1 answer
data population and manipulation in frontend vs. backend
I have very general question. For example, I have employee table which includes name, address, age, gender, dept etc.. When a user wants to see overall employee information, I do not need extract whole columns from DB. I want to show overall…

Anna Lee
- 909
- 1
- 17
- 37
1
vote
0 answers
IBM Watson Tradeoff Analytics Back-end service is not available
I'm trying to integrate Watson Tradeoff Analytics service into my external project to SAP WEB IDE, so I have downloaded the following example:
github.com/dolevdotan/tradeoff-analytics-v2-vanilla-nodejs
Inside the Service on Bluemix I got the…

Aliaks Mashuta
- 48
- 5
1
vote
2 answers
Why "if as expression not statement" is cool?
I have heard few talks on modern programming languages like scala (and few other languages whose names I cannot remember right now), and often got the sense of excitement when the speakers were talking like: "if is an expression in our programming…

exebook
- 32,014
- 33
- 141
- 226
1
vote
0 answers
Storing commands in the video memory vs. accessing them via PCIe
I'm currently reading part 2 of the "A trip through the Graphics Pipeline" blog series by Fabian "ryg" Giesen.
In this particular part, he talks about one interesting point. The commands that the GPU works on can either be read from the video memory…

Anish Ramaswamy
- 2,326
- 3
- 32
- 63
0
votes
1 answer
Optimize Searching Through Rails Database
I'm building a rails project, and I have a database with a set of tables.. each holding between 500k and 1M rows, and i am constantly creating new rows.
By the nature of the project, before each creation, I have to search through the table for…

BananaNeil
- 10,322
- 7
- 46
- 66
0
votes
1 answer
Class memoization vs static class
just looking for opinions or thoughts about how you choose between using a static class vs a memoized class.
For example, consider these 2 python classes:
@cached
class A:
def __init__(self):
#expensive computation
def a(self):
…

Jean Robatto
- 1
- 1
0
votes
0 answers
Time series classification and prediction sensor data from CAN bus
i am trying a time series classification task where i have to predict/classify in advance a driving scenario, making sure my predictions are accurate too and how ahead or time or delayed, it made a prediction. I am working with lstm model but it is…
0
votes
2 answers
Should I place a public static method in a class or an interface?
I wonder what considerations I should make, when I have to decide whether to take an interface or a class to place my static helper method in.
Concrete example: I want to provide a little method, that I can call from the main method in Swing…

Florian Bachmann
- 532
- 6
- 14