Iterators and Ranges: Comparing C++ to D to Rust

Paulo Pinto pjmlp at progtools.org
Tue Jun 15 13:25:23 UTC 2021


On Tuesday, 15 June 2021 at 12:36:07 UTC, Petar Kirov 
[ZombineDev] wrote:
> On Tuesday, 15 June 2021 at 10:53:20 UTC, Paulo Pinto wrote:
>> On Tuesday, 15 June 2021 at 10:13:07 UTC, Araq wrote:
>>> On Tuesday, 15 June 2021 at 08:22:07 UTC, Petar Kirov 
>>> [ZombineDev] wrote:
>>>>[...]
>>>
>>> Er, performance pitfalls can be found with a profiler. 
>>> Crashes are much harder to track down. If I have to pick 
>>> between them, I take the performance pitfalls, as they are 
>>> much easier to fix. At least for your outlined 
>>> `.retro.map.length` snippets.
>>>
>>>> [...]
>>>
>>> Beauty is subjective, safety isn't.
>>>
>>>> [...]
>>>
>>> Wrong forum for that.
>>
>> +1 We already have enough languages where performance trumps 
>> safety.
>
> The real problem is when the safe code is not fast enough and 
> people rewrite it in an unsafe language.

Actually the real problem is that people think it is not fast 
enough, based on urban myths without touching any kind of 
profiling tools, or measuring it against the project hard 
deadlines.

More often than not, it is already fast enough, unless we are 
talking about winning micro-benchmarks games.


More information about the Digitalmars-d mailing list