Skip to main content
88 votes
Accepted

When is the best time to consider performance?

Engineering for Performance Follow vendor recommendations. Use the correct data structures. Implement the correct usage patterns. Don't do anything stupid. Optimization When already written code is ...
Maximus Minimus's user avatar
22 votes

When is the best time to consider performance?

If you want to do optimization at the right times, have slow machines and use them. For a small shop, a good option is to use a slow laptop on the commute and a fast desktop in the office. As an ...
Peter's user avatar
  • 9,955
9 votes

When is the best time to consider performance?

No, you don't have to check after every line because not every line is performance-relevant. It mostly depends on how often a line is executed. A code section which takes 1 ms to be executed is ...
Philipp's user avatar
  • 123k
3 votes

When is the best time to consider performance?

You need to put in enough effort to at least go "is this potentially going to be a bottleneck, and if so, how involved a change will it be to fix it?". Generally speaking, this involves a balance ...
TLW's user avatar
  • 161
3 votes
Accepted

How to reference nameof private serialized field in unity custom inspector

Use your interface Handily enough, you already have your answer. Leave the speed field public, but never pass around or declare references to that class. Only ever ...
Ed Marty's user avatar
  • 5,259
2 votes
Accepted

How to manage instances of (placed) cards and decks in card games?

There is never one "right" or "wrong" way to do something in programming. Just ways which do or do not work for you, your team and your project. So don't worry about doing things the right way, worry ...
Philipp's user avatar
  • 123k
2 votes

OpenGL glVertexAttribFormat vs glVertexAttribPointer

Strides cannot be zero. Try: int strides[] = { (int)sizeof(vec3), (int)sizeof(vec3)}; glBindVertexBuffers(0, 2, ptrs, offsets, strides); //comment Otherwise, ...
Stephane Hockenhull's user avatar
1 vote

Right way to get reference from across scene object in unity

If this object belongs to a scene, I would consider the scene an object in and of it self. In other words, I would have a top level object with a SceneXManager, with references and/logic for the ...
Mars's user avatar
  • 541
1 vote

When is the best time to consider performance?

For a game, your primary goal is to meet the target framerate on the target minimum spec machine (and possibly a maximum load time, etc). In order to do that, no, you do not have to worry after every ...
Damon's user avatar
  • 1,394

Only top scored, non community-wiki answers of a minimum length are eligible