New answers tagged performance
9
votes
Accepted
Reed-Solomon LFSR encoder
I'm interested if the code below could be further enhanced for out of order execution
Maybe. One thing I noticed is that the output of a vgf2p8affineqb (medium ...
1
vote
3
votes
Dijkstra's algorithm for non-uniform undirected hypergraphs: Take II - bidirectional Dijkstra's algorithm with excellent performance
Always document your generic parameters. Since all methods in the class take the same parameters, it might be easier to document them if the methods were instance methods instead of static.
You have ...
2
votes
Convert WKT representations of geometries into GeoJson
Coordinates - are doubles. So regexp is a little more complicated.
...
8
votes
BRESort - Bitwise Relationship Extraction - Intelligent Adaptive Sorting Engine for 32/64-bit & Floating-Point Data
Naming
A consistent prefix is useful, yet code makes public
...
9
votes
BRESort - Bitwise Relationship Extraction - Intelligent Adaptive Sorting Engine for 32/64-bit & Floating-Point Data
I advise against having an interface start out as elaborate as in bresort_research.h - imagine having to keep everything backwards compatible.
I see a lot of code repeating - a maintenance nightmare ...
4
votes
My BRESort adaptive sorting engine in C
Compiler warnings
Code performs about 10 casual signed to/from unsigned conversions. Consider enabling more compiler warnings to identify.
Array sizing
As an alternative for ...
4
votes
My BRESort adaptive sorting engine in C
In addition to the previous answers, here are some other minor suggestions.
Documentation
There are a lot of helpful comments. It would be good to
explain what "BRE" stands for, if it is an ...
6
votes
My BRESort adaptive sorting engine in C
I think overall readability OK.
There is an ambiguity in the documentation in the header:
Minimal memory overhead (256 bytes) - does this mean maximal overhead is ...
8
votes
My BRESort adaptive sorting engine in C
Without seeing all of the code, based only on what I can see, I'm not a fan of the 0, 1, and ...
1
vote
Snake game in pygame with varying velocity
Imports
The import lines should precede all executable code; move the init call:
...
4
votes
3
votes
Image Stitching using SIFT Keypoint Descriptor in C++
G. Sliepen has provided a good general overview; I'm focusing on find_raw_matches here. There are two major issues with it:
Lowe's ratio test is only reliable ...
3
votes
Prime factorization for integers with up to 9-digit long prime factors
I would look up the pollard-rho algorithm. It doesn’t involve any higher mathematics, so you can implement it yourself. If a number n has a prime factor p, that prime factor can be found in about sqrt(...
4
votes
Project Euler #909: L-Expressions I
Analyze looking for intelligence
One answer already mentioned that your approach is basically brute force.
This is due to simply iterating through all.
Looking at the possible steps:
A(u) → u+1
Z(u)(...
7
votes
Find the smallest semiprime satisfying a bunch of conditions
To do this a lot faster:
You want to know whether say nine numbers are all primes. The obvious way of checking this is to test if the first number is prime, if it is prime then check the second number ...
3
votes
Project Euler #909: L-Expressions I
I don't spend a lot of time on Code Review, but I noticed this question in HNQ and let it stew in the background for a month or so before I found a solution. This answer isn't a review of the code in ...
6
votes
Accepted
Image Stitching using SIFT Keypoint Descriptor in C++
Congratulations on getting this far; doing image stitching is far from trivial! The next step to make it looking truly professional is a more sophisticated blending algorithm for the overlapping ...
5
votes
Find the smallest semiprime satisfying a bunch of conditions
repr
repr_a = str(a)
I found repr_a a confusing name for this,
given that we didn't call ...
7
votes
Find the smallest semiprime satisfying a bunch of conditions
As you only use isprime and factorint from sympy it would clean up your code to just import ...
7
votes
Find the smallest semiprime satisfying a bunch of conditions
any other feedback is welcome too
Here are some general coding style recommendations.
Documentation
The PEP 8 style guide recommends
adding a docstring at the top of the code to describe its purpose.
...
2
votes
Allowing a user to draw their own avatar in Turtle
Documentation
The PEP 8 style guide recommends
adding docstrings for functions and at the top of the code. For
example, summarize the purpose of the code:
...
Top 50 recent answers are included
Related Tags
performance × 9135python × 2366
java × 1277
c++ × 1118
algorithm × 1013
c# × 871
javascript × 840
programming-challenge × 655
python-3.x × 642
beginner × 626
c × 555
strings × 377
array × 328
php × 297
vba × 271
excel × 269
sql × 259
numpy × 243
primes × 221
jquery × 206
image × 204
multithreading × 183
python-2.x × 181
matrix × 179
recursion × 156