Hacker News new | ask | show | jobs
by ioquatix 3423 days ago
I said:

> In terms of performance, I don't think Metal is even a contender, given how bad macOS hardware is compared to Wintel.

The response was:

> It makes no sense to judge the quality of an API by the power of the available hardware it might be running on.

You are right, that my statement is not very clear.

The key point here is that I'm not judging the quality of an API by the power of the available hardware, but the quality of APIs relative to how much overhead they add, and that's quite a different proposition.

Given my intimate frustration with the state of Mac hardware and GPUs, I brushed off macOS as being somewhat ancient w.r.t. modern hardware and benchmarks. You can't go out and buy a Mac with a GTX 1080 for example. In fact, even the best Mac hardware you can buy is ridiculously outclassed by PCs costing significantly less.

However, back to the specific point of interest:

The overhead of APIs can be measured if you run the same benchmark, on the same hardware, with the different API. On Windows, it's possible to compare, say, DX9, DX11, DX12, OpenGL and Vulkan within the same benchmark. It's not possible to test Metal this way.

Specifically though, Vulkan is a C based API which is essentially as fast as it gets, in terms of actual function calls and so on. In comparison, Metal uses Objective-C. If you are familiar with Objective-C, you'll know that it doesn't have the fastest message dispatch (quasi-function call).

Basically, it would be really interesting to compare them, holding all other things equal. But, doing this with off the shelf GPUs simply isn't possible AFAIK. macOS hardware is simply too far behind. You might be able to jury-rig something using an external GPU, but it's still not a good comparison. My past experience of the graphics stack in macOS tells me it's unlikely to be great.

1 comments

You need to provide some evidence that function dispatch is a limiting factor for Metal, if you're going to argue that it is a limiting factor.

Also you seem to be under the impression that because a machine is expensive it is destined for gaming.

> You need to provide some evidence that function dispatch is a limiting factor for Metal, if you're going to argue that it is a limiting factor.

Without investing a lot of effort, the best I have is this: http://www.codeotaku.com/journal/2009-05/run-time-polymorphi...

In addition, my entire lament is that it's not easy to compare Metal to anything else. Ideally, this would tell you whether function dispatch was REALLY a big issue or not.

> Also you seem to be under the impression that because a machine is expensive it is destined for gaming.

No, that's not a valid assessment of my position.

I have an expensive desktop, and I use it primarily for work. Even the Mac Pro performs poorly when compared to an equivalently priced PC. Even just for work related scenarios. Some good comparisons on YouTube :D