Comments (1)
That could definitely work, however adding another parameter to the user-facing API just to support a slight optimization is probably not a very good way to go about it. The API is usually of utmost priority. Instead, internally, the kind of body can be read, and if static perhaps an optimization could be made.
However, this optimization may not actually save any time simply due to the extra cost of checking the flag.
Additionally, modifying any of the code is in and of itself a risk, since new bugs can potentially be introduced.
Not to say your suggestion is a bad idea at all; you're correct that a potential optimization here exist. It would just need to be qualitatively decided whether or not adding such a modification outweighs the costs. Costs namely being:
- Changing APIs and adding parameters should be viewed as extremely costly. APIs are of utmost importance, since they are user facing and directly affect user experience.
- Is the change likely to introduce new bugs?
- Is the optimization going to really be any faster than the cost of extra if-statements?
- Is this optimization going to be solving any bottlenecks? If this optimization does not address a bottle-neck, the performance benefit (if any) may be impossible to realized in practice.
In any case, I'd be willing to take a look at a pull request :)
Closing this for now, but feel free to comment or ask more questions here. We can re-open it if we need to.
from qu3e.
Related Issues (20)
- How could I implement a vertically-sliding door? HOT 1
- Demo does not compile on Windows
- Would qu3e be a good base for "distributed physics"? HOT 3
- Is it possible to set up without ImGUI? HOT 6
- assert (axis != 0) HOT 7
- qu3e for a voxel engine? HOT 4
- Position of collision objects being null HOT 21
- Size of box HOT 1
- I dont understand rotating boxes HOT 5
- Can this physics engine change its timescale on the fly? HOT 3
- Is memory management needed?
- q3Scene.Step is freezing
- -
- A simple box stack is not stable without sleeping
- This project is still alive? HOT 4
- How can I read the XYZ euler angles from a q3Mat3? HOT 1
- Sliding boxes "catch" on edges in floor HOT 7
- linker errors? HOT 1
- how do I import HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qu3e.