Vlad
std::memset(arr, 0, sizeof(*arr) * N);
Anonymous
-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
Anonymous
It will not be removed from clang. Google uses that flag in production
Vlad
Works like a charm
Anonymous
This is not a chat for your homework questions
Asuna 🍓
new int[length] { 0 }
Vlad
Why new tho?
Anonymous
Anonymous
this is bad
Anonymous
Do not use new
Mar!o
use std::unique_ptr
Anonymous
No, this is not the case
Indolent
*sighs*
Indolent
@Bonniex_x Do you give private coding lessons? I'm willing to learn!
V01D
ברני
Perv 🤨
Indolent
Perv 🤨
I've reported you for child abuse.
Indolent
Admin look what he just said!!!!!!!
Indolent
V01D
Perv 🤨
Look at here PFP
Shes half naked.
I'm just saying.
Vlad
Indolent
Perv 🤨
I am going to press defamation charges against you.
Indolent
I demand a trial.
Asuna 🍓
Prone to memory leak
It can be used with unique_ptr, but Danya said that's not the reason.
Indolent
Vlad
Vlad
unique_ptr doesn't store size
Indolent
Asuna 🍓
Indolent
Japanese. That was a very Japanese edit.
Asuna 🍓
Roxifλsz 🇱🇹
Roxifλsz 🇱🇹
Asuna 🍓
Indolent
I bet she's a Jap.
Roxifλsz 🇱🇹
>she
I refuse to believe that
Roxifλsz 🇱🇹
Only male weebs use anime girl profile pictures online
Dima
Dima
true
Roxifλsz 🇱🇹
Indolent
Here it goes....
Roxifλsz 🇱🇹
Yes this is OT chat now
Dima
Indolent
Y'all gonna scare the chick away
Vlad
Dima
jojo sux
Indolent
Roxifλsz 🇱🇹
Indolent
Vlad
Dima
Indolent
Aye she's as female as a man can be
Vlad
Wierd isn't it a male name?
Roxifλsz 🇱🇹
Dima
s/m/n
Alex
this is not about access, its about computation
M.Khorram
I'm not sure, but processing double might need more cpu clocks
so the architecture of cpu matters
Vlad
Processing double and float is the same speed
Vlad
But caching for floats is better
Vlad
If you compute a lot of them.
Anonymous
Because of the amount of data
Vlad
Also floats fit into simd rather nicely
Vlad
Cpu does not have separate blocks for floats and for the double
Vlad
Means the registers are of the size of double
Vlad
Same deal with integers tho
Vlad
Caching and SIMD
Vlad
integers have their own
Vlad
Simply put you can pack 4 floats into 128 bits
Vlad
But only two doubles
Vlad
Given that simd registers are fixed size
Vlad
You can do twice as many computation