by 2bitencryption · 7y ago · 0 comments
Microsoft/Amazon/Google are paying $$$ to increase availability of AI/machine learning education, because they want a knowledge pool to hire from. Wouldn't this be the same with languages?
One reason D code is faster is array slicing, where you can refer to a subsection of an array. This pays off for things like strings. Consider the string:
s = "/root/me/file.ext";
I want to extract the "file" as a string. In C/C++, because strings are 0-terminated, I have a cache hit, allocate 5 bytes and copy 5 characters and install a 0. In D, name = s[9 .. 13];
I have no cache hit, add 9 to a pointer, copy 5 to the length.(A slice is equivalent to a (length, pointer) pair.)
Because they want people that are good with the tool, not people that crash-coursed/bootcamped their way into what they are told is a marketable skill.