Optimisering af kode

User avatar
theschwartz
Level 1 - Speck of dust
Posts: 16
Joined: 16 Apr 2008, 11:01
Location: Copenhagen
Contact:

Optimisering af kode

Unread post by theschwartz » 31 Aug 2009, 14:41

Hej

Jeg vil høre om der er nogle som kender bøger, links, generelle tips&tricks til
optimisering af kode generelt (som i største grad kan bruges af alle sprog).

Venlig hilsen
Martin
May the Schwartz be with you...
---
http://theschwartz.dk


User avatar
Crisium
Level 7 - Spellcaster
Posts: 71
Joined: 13 Mar 2008, 17:57
Location: Odense C
Contact:

Re: Optimisering af kode

Unread post by Crisium » 10 Aug 2010, 11:18

Hi Martin,

I would be amazed if such a book existed. There is of course generalized optimization like moving constants out of loops and so on...

but optimization is very dependent on what you are trying to archive.

If you really need a generalized method to optimization that would work on almost all languages, then I would say cache as much as possible.

please note,.. my suggestions is related to speed optimization... if you are trying to optimize size then that's another story.

regards,
Peter Wraae Marino
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph

rasmuskaae
Level 2 - Grain of sand
Posts: 23
Joined: 11 Mar 2008, 08:56
Contact:

Re: Optimisering af kode

Unread post by rasmuskaae » 10 Aug 2010, 11:38

den bedste ressource til optimering er i, efter min mening, optimering af algoritmer og datastrukturer. efterfølgende kan man kigge på sub-optimeringer med sprogspecifikke konstruktioner, maskinkode, cache udnyttelse, osv.

Zacker
Level 53 - Syntax error
Posts: 536
Joined: 12 Mar 2008, 15:18
Contact:

Re: Optimisering af kode

Unread post by Zacker » 10 Aug 2010, 17:42

Der er lidt spredt fægtning omkring optimization, primært rettet mod C++ og game engines, i lecture slides fra 11-Nov og 16-Nov:
https://blog.itu.dk/MENP-E2009/course-schedule/

rasmuskaae
Level 2 - Grain of sand
Posts: 23
Joined: 11 Mar 2008, 08:56
Contact:

Re: Optimisering af kode

Unread post by rasmuskaae » 11 Aug 2010, 07:34

Zacker wrote:Der er lidt spredt fægtning omkring optimization, primært rettet mod C++ og game engines, i lecture slides fra 11-Nov og 16-Nov:
https://blog.itu.dk/MENP-E2009/course-schedule/
Unity-guttens oplæg ser ganske fornuftigt ud. Specielt er det godt han prædiker lidt i mod brugen af virtuals - som de fleste akademikere ville bruge til at løse det viste problem :-)

Post Reply