All Questions
Tagged with object-oriented performance
144 questions
10
votes
3
answers
1k
views
Computing π(x): the combinatorial method
This is my C++ implementation of Computing π(x): the combinatorial method by Tomás Oliveira e Silva. The math involved is elementary number theory, but fiddly and not the focus here. I have ...
3
votes
1
answer
91
views
Merge discrete integer intervals
What it does
The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
1
vote
1
answer
284
views
Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?
This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
3
votes
2
answers
185
views
BlackJack in python
I began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for ...
3
votes
2
answers
251
views
Tic-tac-toe OOP Minimax Algorithm
I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
4
votes
1
answer
69
views
Terminal Graphical Visualizer, using a queue of different matrices
I built a project in which I provide a string input or a whole matrix to configure a frame, create a bunch of different frames and push them into a queue and finally print them in order of the queue.
...
4
votes
0
answers
412
views
A vehicle database in Excel
I'm looking for some help. I'm new to coding and have started creating this Vehicle database program in Excel for a friend to use.
He is wanting to be able to see all vehicles he owns, when ...
0
votes
1
answer
253
views
Python Logic Gate Circuit Simulator [closed]
I have recently become interested in simulating logic circuits because of a electronics class at school. I have created a functioning simulator for logic gate circuits in Python. My implementation ...
4
votes
1
answer
496
views
Yet another sparse set implementation
I got inspired by this blog post and implemented a fixed-size sparse set, removing the need for vectors, because the sparse set's size equals at least ...
5
votes
1
answer
1k
views
Matchsticks game in Python
I made the following game in Python applying object oriented programming and I would like to know if there is something to improve.
PS: My native language is Spanish, if you see something wrong ...
4
votes
1
answer
636
views
Code to scan filesystem, store every path into sqlite and update only when something has changed
I have made a program that does what the title explains. It also hashes the file to check for changes. I will be doing this for a project to keep track of files that has been changed when doing ...
2
votes
1
answer
178
views
Prevent Column Name Collision
I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
1
vote
1
answer
208
views
Rock paper scissors coding assignment
I had a coding assignment to write a Rock Paper Scissors game. The main task is not to show a solution but rather to test the coding style. The rules are such:
Problem:
rock is "O", paper is ...
2
votes
2
answers
125
views
Complex Filter in one Opration
I am working on a Data-based application.
I wrote a code to filter the table.
The table has String and Numbers.
I some filter ...
-1
votes
2
answers
88
views
Simple Vehicle speed representation [closed]
This code models two vehicle types, with a method to accept a string representing a boost to change speed.
How can I optimize performance in inheritance child class?
How can I reduce the code inside ...