Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by jfkebwjsbx on Saturday June 13, 2020 @04:05PM
(#23512257)
> Direct3D’s API is based on COM which is all about vtable-calls.
It isn’t. It looks like COM, but it isn’t.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by DaiPlusPlus on Saturday June 13, 2020 @04:14PM
(#23512312)
Did things change with DX12?
Just asking because this article is quite clear about how DirectX is all about COM: https://docs.microsoft.com/en-us/windows/win32/prog-dx-with-...
> The Microsoft Component Object Model (COM) is an object-oriented programming model used by several technologies, including the bulk of the DirectX API surface. For that reason, you (as a DirectX developer) inevitably use COM when you program DirectX.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by jfkebwjsbx on Saturday June 13, 2020 @06:24PM
(#23513346)
DirectX yes, Direct3D no.
I am not sure about D3D9, but 10 and 11 and 12 are not COM.
The performance overhead of a virtual vs non-virtual call on the CLR is negligible - same as with C++. For proof, look at Direct3D which is performance-critical, yet Direct3D’s API is based on COM which is all about vtable-calls.
Linq itself is also very decent. I won’t argue that Linq is perfect (e.g. suboptimal list allocations when the total output length can be known in-advance), but its hardly “slow” - certainly not enough to impact any production workloads - you’d only observe a difference between hand-written loops and a Linq expression in a contrived synthetic benchmark.