Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bdisnainc
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
bdisnainc
7y ago
Very good GCs can be faster compared to common system allocators while minimizing the STW moment, but you cannot beat using a proper allocator for your needs.
2.
▲
by
bdisnainc
7y ago
It does not do random damage, you get a segmentation fault in most systems. In really small embedded you should not be allocating anything meaningful in the stack anyway.
3.
▲
by
bdisnainc
7y ago
That is because you apply pattern matching when it is not really useful here, on top of avoiding a simple ternary operator. In some languages, you simply write: if (user) nameLabel.text = user.name; else nameLabel.text