hanabi1224 / hanabi1224/Programming-Language-Benchmarks
Unnecessary heap allocation in mandelbrot/2.cs
Open
- Dominant language
- C#
- Stars
- 800
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
Why is this here?
https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/1a0aea4c2917e37aea6a40c58bc6481f6ed52fdc/bench/algorithm/mandelbrot/2.cs#L52
Rest of the code assumes 256bit (4 doubles) vectors and
So this is equivalent of just calling
```C#
var ci = new Vector(civ);
```
Just with heap allocation of new array each call :/
Same constructor overload `new Vector(0);` (I would use `Vector.Zero` but the performance impact will be negligible) is used in the zeroing of all other vectors so the heap allocation seems odd.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.