Comments (4)
Yeah. I've been considering it. I just wondered if it affects performance somehow... ?
from three.js.
If you're using Chrome you can just do this
console.time("test1");
for ( var i = 0; i < 1000000; i++ ) {
x = v.addSelf( new Vector( 1, 2, 3 ) );
}
console.timeEnd("test1");
... and check the results in the console.
from three.js.
Ok - i ran this a bunch of times:
console.time("vanilla");
for ( var i = 0; i < 10000000; i++ ) {
v1.addSelf( new THREE.Vector3( 1, 2, 3 ) );
}
console.timeEnd("vanilla");
console.time("chainable");
for ( var i = 0; i < 10000000; i++ ) {
x = v1.addSelfChainable ( new THREE.Vector3( 1, 2, 3 ) );
}
console.timeEnd("chainable");
Output:
vanilla: 734ms
chainable: 717ms
vanilla: 728ms
chainable: 716ms
vanilla: 725ms
chainable: 714ms
It looks like the chained version is faster (in chrome).
from three.js.
Sounds good! I'll merge then :)
from three.js.
Related Issues (20)
- FBX mesh breakage morphing MTIs HOT 1
- GLTFLoader addon is missing (import from examples?!) HOT 1
- Distortion of the model due to being too far from the origin HOT 2
- MapControls requires enableRotate=false on IOS HOT 1
- wrong z order when rendering material with alpha mode "BLEND" HOT 7
- It appears that the resources associated with DRACOLoader may not be completely released, leading to memory consumption issues HOT 4
- I wish an example for the outputStruct node HOT 3
- Adding postprocessing support to the three. js editor HOT 1
- WebGLRenderer.setSize cannot set properties of undefined (setting 'width') HOT 2
- Enhance target type for SpotLight and DirectionalLight HOT 1
- Build a grid through custom coordinates HOT 1
- `.equals` in class `Spherical` HOT 6
- FBXLoader loads default Unreal model with wrong rotation HOT 4
- Editor can't import glTF with .ktx2 textures HOT 1
- MRT needs a filter if there are several objects with different shader counts in the scene HOT 3
- File Export Whole Scene feature was removed 😨 HOT 2
- RectAreaLight passes through material HOT 6
- Editor: drop event in UIOutliner of ui.three.js not being call HOT 9
- Editor: Export GLB and GLTF fails to fetch HOT 2
- MeshToonMaterial support for WebGPU
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 three.js.