this post was submitted on 02 Nov 2025
815 points (98.2% liked)
Technology
76620 readers
3082 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It is a translation layer, but the bit you added "to native code" sounds like you're misunderstanding what translation layer means.
Games use a collection of APIs (DirectX is a set of APIs, but there's others to handle offer operations like network access and such) to interact with OS functionality, and also receive communicarion back from the OS (the windows message loop). Proton and wine are implementations of those APIs that translate the API calls to their equivalent in linux, as well as setting up their own message loop that translates messages from the linux kernel and UI system into their windows equivalent before sending them to the registered windows messaging loop functions.
A simple example would be if a function header in windows looks like int32 SomeFuncWin( int64 index, char* name ), but looks like int32 SomeFuncLinux( std::string name, int64 index ), then the translation would be something like:
int32 SomeFuncWin( int64 index, char* name ) {
std:string TranslatedName( name );
return SomeFuncLinux( TranslatedName, index );
}
So it doesn't change/translate any of the code of the program itself, it just provides the environment that behaves exactly like a windows environment by translating the "hey could the OS do this for me?" requests from windows to linux. Note that not all translations are that simple, there might need to be more processing on the values, missing arguments might need to be filled in, irrelevant arguments ignored, sometimes data needs to be translated to another format, etc.
The speed ups can come from improved efficiency in the underlying implementations (which Vulkan has, as I understand even using a translation layer from DX to Vulkan in windows can result in better performance) or having fewer services running in the background.
You are partially right, I was fast and sloppy and I gave the impression all is jitted and it is not the reality.
The part of the translation is fine. However there are parts that are compiled beforehand (shaders for example and I can recall something about arm or other architectures, not sure now). And this is a crucial point of the extra performance, because some parts can be ported to more updated/efficient implementations, not because there are less services in the background.