Re:Performance comparison: counting words in Python, C/C++, ...
by Areading314 on Sunday July 24, 2022 @09:01PM
(#32219449)
Doesn't malloc return a pointer? Sounds unsafe
[ Parent
| on HN ]
Re:Performance comparison: counting words in Python, C/C++, ...
by yb303 on Sunday July 24, 2022 @09:07PM
(#32219492)
That's not the point. It's perfectly safe and there's nothing else in C.
The point is you don't have to call this function for every single word. It takes time and pointer increment doesn't
Re:Performance comparison: counting words in Python, C/C++, ...
by centilliard on Sunday July 24, 2022 @11:59PM
(#32220353)
Ooo... spooooky pointers... ancient prophecies speak of the Earth splitting in half and swallowing everyone who's ever thought about allocating memory.