Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for poorly optimized code [closed]

Tags:

c

open-source

I posted this on daniweb, but have revised my thoughts on the matter.

Basically my 'Integrated Software Systems' class midterm is to take some code (either you wrote or someone else's) and optimize it.

I thought to myself why not use this opportunity to enrich the open source community, I know it's really going to only be a function or so, but if more people from the course were interested maybe it would make some progress for some projects.

So does anyone know of any functions or small chunks of code (nothing really large), that would be somewhat easy to stub out and just run independently of the rest of the code, and just work on optimizing it, especially pieces that need to run fast, that are in an open source project?

I'll definitely post this on my blog and refer people to this question for people wanting ideas on functions to work on from my course.

Frankly I've been tired of just doing work that is academia only and it really isn't helping anyone except learning theoretical stuff, I would rather put it to good use and help others.

like image 215
onaclov2000 Avatar asked Feb 06 '10 05:02

onaclov2000


People also ask

What does it mean when a game is poorly optimized?

Poor optimization means a game is not using all of the resources available to it. If you have 30 fps and your GPU is at 70% usage.

How do you make sure your code is optimized for performance?

Optimize Program Algorithm For any code, you should always allocate some time to think the right algorithm to use. So, the first task is to select and improve the algorithm which will be frequently used in the code. 2. Avoid Type Conversion Whenever possible, plan to use the same type of variables for processing.

What does it mean to optimize your code?

Code optimization is any method of code modification to improve code quality and efficiency. A program may be optimized so that it becomes a smaller size, consumes less memory, executes more rapidly, or performs fewer input/output operations.

How do I disable optimization?

Use -O0 to disable them and use -S to output assembly. -O3 is the highest level of optimization. Starting with gcc 4.8 the optimization level -Og is available. It enables optimizations that do not interfere with debugging and is the recommended default for the standard edit-compile-debug cycle.


1 Answers

  • ATLAS - might be hard to improve, but if you do, big kudos
  • UBLAS - may be able to improve some common expression patterns
  • sympy - python code, some routines are slow. developers would definitely appreciate help.

Probably sympy would have greatest payoff in terms of improvement. Atlas would be nearly impossible to improve in my opinion.

you could also check out projects links on oonumerics.org, but if you do choose project, make sure it is still active. the projects are grouped by their fields so you have a lot to choose from.

like image 130
Anycorn Avatar answered Sep 29 '22 07:09

Anycorn