Native array is faster than this[]
See original GitHub issueI’m getting significantly faster performance using a native array this.arr = [];
and replacing all instances of this[]
with this.arr[]
. Running the two_million benchmark, I’m getting ~23 milllion ops/s with this[]
vs 25-26 million ops/s using this.arr[]
Thoughts?
Darwin 13.4.0 x64 Node.JS 4.1.2 V8 4.5.103.35 Intel® Core™ i7-4870HQ CPU @ 2.50GHz × 8
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Is NativeArray slower than regular array? (2018.1.0b6)
This shows that single-threaded calculations with regular arrays are about 2.3x faster than the same calculations using NativeArray.
Read more >Java Buffer types versus native arrays: which is faster?
However, they are not as fast as native arrays in my experience. ... That is, arrays are over 4 times faster than IntBuffers...
Read more >Comparing the performance difference between Struct-As ...
When using a NativeArray, the allocation is more costly than when allocating a struct on the stack, so my hypothesis is that SAAs...
Read more >NativeArray<T> is slower than built-in C# array - Issue Tracker
NativeArray in mono in the editor is slower than builtin arrays * We need to make sure agressive inline works properly, if not...
Read more >Why are native array functions are so much slower then loop
So why are native functions are so much slower then old loops and what was the point of creating them if they are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@calebboyd I didn’t want to be ‘that guy’ =]
You’re more than welcome to do one however
@Salakar you should submit a PR so all the dependents can benefit 😃