PocketMine / PocketMine-MP

Legacy PocketMine-MP repository. Head to https://github.com/pmmp for up to date software.
https://www.pocketmine.net/
GNU Lesser General Public License v3.0
1.26k stars 660 forks source link

Premature optimization #4204

Closed SOF3 closed 8 years ago

SOF3 commented 8 years ago

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

ghost commented 8 years ago

Tested?

gaoyichuan commented 8 years ago

@SkygridRex The code are same, but can slightly increase performance

Addison118 commented 8 years ago

That statement is only true before the minor optimizations have been made...

PrimusLV commented 8 years ago

That's exactly what @PEMapModder said...

Addison118 commented 8 years ago

This isn't a social place. It's GitHub, don't make it like twitter.

SOF3 commented 8 years ago

In Donald Knuth's paper "Structured Programming With GoTo Statements", he wrote:

Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

PrimusLV commented 8 years ago

@Addison118 ban me.

http://forums.pocketmine.net/threads/tips-tricks-good-bad-practices.16113/

inxomnyaa commented 8 years ago

I really love this pull request, you've been putting thoughts into it.

SOF3 commented 8 years ago

Well this pull request is obviously spam right?