Ask HN: How to get a job as a compiler engineer?

129 points by amir734jj ↗ HN
I have a BS and MS in computer science and I have been working part-time on my PhD in compilers for four years now. My research is about attribute grammars. I love my PhD research topic, it's challenging, fun and novel but I don't see it being used for any practical applications. I teach basic compiler course part-time as an instructor at my university as well. I work full-time as a backend software engineer at Microsoft. My goal is to actually use the concepts I spent so much to learn in my PhD in my career. Where should I start? What tool/library/framework is a must know for a compiler engineer? What are the companies that do exciting stuff in compilers?

I appreciate any help. Thank you

62 comments

[ 2.9 ms ] story [ 135 ms ] thread
(comment deleted)
> My research is about attribute grammars.

> My goal is to actually use the concepts I spent so much to learn in my PhD in my career.

Do you mean you're specifically looking for a job that lets you focus on the grammar/parsing of programming languages (possibly with attribute grammars in particular!)? Or do you mean front-end (or general) compiler development more generally? Because if you specifically want to apply research on parsing techniques, as much as I love that area and wish there was more interest in parsing, I dare say you're unlikely to find such businesses hiring for something like this specifically (unless there's some research institution working on projects like this), given it's not exactly a money-making opportunity. Though if you somehow think there might be such a job, I imagine the best people to ask would be PL faculty.

You might be surprised.
If you know of any such companies it would be helpful to mention them? Instead of just suggesting they exist but not giving any hint of where or how to find them.
I'm no expert in this, but hardware companies like ARM will spend money to get compilers like C's and Rust's to work on their chips.

Maybe have a snoop around these types of firms?

I work on the sql optimization and execution team for a data warehouse company. SQL isn't the most interesting language to build a compiler for, but I figure it's the easiest way to get paid to build one. You could probably transfer to microsofts data warehouse team and help them build their sql compiler.
I thought SQL featured feeding prepared statements to a JIT? I'd have put that near the top for interest - a bunch of rewrite rules to improve the sql then a mapping to the database implementation as runtime layer, probably with the glue in machine code. Maybe also speculation on current db state.
You write that you currently work full time at Microsoft, a company with a large developer tools division that actively develops several language compilers. Have you reached out to managers in those groups to learn if they have (or could create) opportunities that match your interests?
This tbh. If the compiler the Microsoft team maintains is open source (which most of the ones people have heard of are), having involvement in that open source community would probably also be a plus - it helps show the practical part of practical compiler development.

Anyways, many public-facing compilers (C++, C#, VB, F#, the .NET runtime as a whole, TypeScript) are in the devdiv org - if you look up Julia Liuson in the org chart and explore down from there, you can probably get a good idea of who you most want to grab coffee with (or whatever the remote work equivalent of that is now).

Outside of devdiv, there's also some esoteric c++ compilers, PowerShell, and SQL compilers housed in the windows and azure orgs, plus iirc there are some people who work on v8 fulltime around the edge team now, too.

Point is that you've got much more direct access to those teams and opportunities than most people already, being only an internal transfer away - hopefully you can make use of that.

Don't forget Microsoft Research. I mean, OP has been working on their PhD for four years now (albeit part-time).
Great point -- if you work for a large company, an internal transfer can be a great way to switch career specialties. Because the company already knows you well they're often willing to consider you even if you don't yet have much in-specialty experience in the new role. I got my start doing full time open source work by making an internal transfer (not in MS, different firm).
It is my understanding that the language teams of C# and especially F# are actually quite small, and I imagine competitive. I would wager that there's more compiler work to be done in Microsoft Research. This is a hunch based on things I have read.
Yes, but can't hurt to reach out in any case.
Oh for sure. Microsoft seems like a good place to work anyway, with a ton of stuff going on.
I really don’t get this post. They are working on a phd in compilers and work at one of the best software companies in the world. Why can’t they just try and transfer?
Yeah they are basically overqualified.
In something as super specialised as compiler engineering there's no such thing a over-qualified.
You could switch to academia if your Ph.D. period generated some good publications. This means a downround in terms of salary, but trading that cash against freedom to pursue your own ideas. If you are already teaching voluntarily on the side, that is a signal that it could be the career for you.

If you are open to working with grammars & parsing algorithms also in non- deterministic ways, you could consider a research career in NLP.

Finally, you could apply to work for a specialist compiler company (JetBrains, Green Hills Software etc.).

Maybe a stupid question, but have you tried applying to compiler engineer jobs? There is a list currently at the bottom of this thread: https://news.ycombinator.com/item?id=32590459

I think you may find that lots of the job is ‘regular software engineering’ work if it involves maintaining a production compiler rather than being all about specific compiler techniques there will be lots of time on eg making the compiler faster, improving debugging information, coming up with better error messages, etc. I guess something more on the research end is going to be totally different.

Right, and even if you're not ready to apply yet you can look at the job ad's requirements and nice-to-haves (for instance for a job working on llvm or gcc you're going to need C/C++) and see how well you fit them.
I'm not a compiler engineer but I'd focus on figuring out what problems compilers are being developed to help solve and go from there, applying to companies that do those things.

Google has a lot of compiler stuff. XLA for machine learning: ML graph compilation is a huge area right now because ML is so costly and optimizing ever-growing ML models is something compilers help a lot with. Closure for javascript. A bunch of their own languages: {a few versions of SQL that optimize for different workloads}, {go for servers}, {dart which is both AOT + JIT compiled for rapid app development but performant serving}, {carbon because rust is hard to adopt at a company like google}, ...and this is just off the top of my head. Teams continue to develop and improve these compilers & devtools around them every year, so there are definitely jobs. It feels like big companies like Google / MSFT are most likely to be doing interesting things with compilers because they don't have as much direct linkage to product and thus it's hard to get budget to pay people to do these things unless you're a money-printing behemoth. I'm assuming you don't want to take a big pay cut just to work on compilers :)

In terms of landing the job, I don't think knowing specific tools/libraries/frameworks are that important. I actually flirted with joining one of the teams mentioned above years ago despite not having compiler background, so that's the other thing. They care a lot more about you being a solid engineer and teammate than anything else. PhD will help you get an interview and if the _perfect_ role opens up for you, you'd have an edge. But more often I see folks with PhDs work on things unrelated to their academic research. And actually I think it can be more fun if you're open to doing something a little different, if still in the domain of compilers/programming languages. Your experience will definitely become useful if you are close-ish to the subject, but you'll learn more if it's not _too_ close.

I'd suggest you pick an open source compiler and try to improve it. The people reviewing your work approximate those interested in the same area, some of those are probably employed to do so. That'll give you a list of potential employers plus people who know who you are if you decide to apply.

LLVM / MLIR / GCC all have significant numbers of employees working on them as well as volunteers, partly because hardware companies employ software devs to make them work for their hardware. I'm not as clear who funds front end work, seems to be big companies that like internal tooling.

Compilers are great. Exciting is in the eye of the beholder though, you'd have to expand on what interests you before we could guess a more specific direction to try.

The company I work for (Trail of Bits[1]) does compilers-based program analysis and engineering; it's been a significant part of my job for the last 4 years of my career. We're also hiring[2]!

Overall, I think the job market for compilers/program analysis is pretty strong right now. It's also well spread between companies of different sizes and scopes: MS and Apple are doing serious LLVM-based optimization work, while you also see medium-sized companies (Fastly and CloudFlare) doing interesting work on WebAssembly. On the research side, companies like ToB and Galois have been doing LLVM and other compiler-based program analysis for over a decade.

[1]: https://www.trailofbits.com

[2]: https://www.trailofbits.com/careers

Companies making CPUs are often looking for compiler engineers, mostly in the backend of course. Intel, AMD, ARM, STMicroelectronics, Kalray for instance. You might be able to find a job at a company working with the RISC-V arch too. You'll probably work on LLVM and/or GCC, or maybe an in-house compiler. I know someone working at one such company after doing a PhD in the area and they are happy. I won't be more precise in public, my email is in my profile.
My general impression is that a well paying, full time compiler position is quite competitive. It's relatively niche, and there are a lot of good engineers who would love to work on compilers all day rather than the typical drudgery (it's one of the purest CS pursuits). I'd suggest scratching your itch by working on an open source compiler in your spare time. And with significant experience under your belt, you may be able to network and get that dream job one day.

Source: I know people on both the Scala and Swift teams and this was my experience. Everyone wants to work on these teams, and it was generally seen as the most enjoyable work. You pretty much had to have good connections/solid OSS contributions/relevant PhD to get a placement on these teams. I imagine it's the same at MS.

> What are the companies that do exciting stuff in compilers?

Some companies solve problems that have a larger component of parsing and evaluating things.

One example is Hasura's SQL-to-GraphQL layer: https://hasura.io/

Another example is GitHub's CodeQL: https://github.com/github/codeql

A third example -- I forget the name of the company -- parses Counter-Strike games real-time and restructures this data for better analytical introspection, e.g. for betting, time-scrollable replay, 2D rendering, etc. There appears to be a lot of hard-earned knowledge going from a stream of events monkey-patched over two decades, to a complete model of a game (who's on what team, who is dead, what round is this, etc.)

Microsoft does a lot of interesting compiler-related stuff, too, of course.

Then there's blockchain: A lot of programming-language enthusiasts have been employed to write VMs and DSLs to express safe application-level environments. An example is Anoma's Juvix: https://github.com/anoma/juvix

A job I was looking at involved building a more programmatic interface to some legacy SCADA systems, i.e. make old factory monitoring systems interoperate via a DSL. The idea, I think, is to transform and manage the configuration files from a dynamic GUI system, but not employ people to drag-and-drop; rather, express this as code.

tl;dr: If your main tool is a compiler, there are compiler problems everywhere.

My compilers professor mentioned that national labs consistently reach out to him asking if he has any good PhD students. Just mentioning this so you don’t forget to emphasize that route. Perhaps you’ve established connections during your research that have similar contacts in the labs?
Yeah that's what came to my mind first as well; talk to your advisor. If you're on good terms with them they'll be happy to send you at least for an internship somewhere.
A few years ago, a friend of mine applied to a job at Microsoft for developing the typescript compiler there (open source).

Generally, you can try these companies:

* really big software companies, like Microsoft, IBM, Google...

* chip makers

* developer tool makers, like JetBrains

Also, search engines are a thing :-) https://www.dice.com/jobs?q=compiler or try linkedin...

Consider working on a database.
"attribute grammar" and "novel" in the same statement? Whoa! I tried to publish a paper ~15 years ago on attribute grammars … without success and non-constructive review feedback. I am not aware of any company making use of attribute grammars in production. I had the goal of making use of attribute grammars as part of https://github.com/mozilla-spidermonkey/jsparagus (SmooshMonkey), but making a JavaScript parser generator which is as efficient as our hand-written parser is already surprisingly difficult, and the COVID ended the project.

On the topic of finding a job … I would be of no help. The only internships/jobs I found so far were all outside the usual applications forms:

* By emailing to the author of an R&D language that I was already using, asking if they could make a position for me in their lab.

* From a teacher recommending me in the start-up where he worked for building an interpreted language.

* By going to one of the Firefox 4 party, and giving a visit card after seeing a presentation about SpiderMonkey.

Then, if you are interested in applying for a job opening on compilers. There is one right now at Mozilla, on WebAssembly: https://www.mozilla.org/en-US/careers/position/gh/4437801/ … but there is no attribute grammar.

Easily get employed as an entry level software engineer in a local company, shave your head and start selling blue meth Disclaimer. Thisis a joke referencing breaking bad TV series please don't produce and sell drugs in industrial scale
I'm a bit surprised by what you write.

Until recently I was heading a compiler team. We found it impossible to hire experienced compiler engineers despite paying very well, so we essentially switched to hiring promising university graduates and trained them on the job. My peers in other companies are all in the same situation.

Note that there is a mismatch between academic and industrial compiler work. A university compilers course is necessary, but not sufficient to be considered experienced, you should have good knowledge of things like ABI design, ELF, DWARF, LLVM's tablegen, C++, compilation of varargs etc. This stuff is not typically taught in compiler courses (for good reason, since it is a bit arbitrary) but it is absolutely vital to producing a working, industrial strength compiler. You should also have some idea about computer architecture, so you can read ISA manuals and understand what individual machine instructions do, and what performance characteristics they have. Otherwise you won't be able to write good instruction selection and scheduling. Given the increasing prevalence of JIT compilers (eg eBPF in the Linux kernel), it's also useful to know about that. Another dimension is security: modern compilers to need to worry about stack canaries, shadow stacks etc. This too is not taught at universities.

Regarding what tool/library/framework, skills are rather transferrable, so I would not worry too much about this. LLVM is by far the most widely used open framework and is easier to get into than other open stuff. If you are knowledgable about security and verification, doing hacking on e.g. CakeML [1] or CompCert [2] might be interesting.

A good way of being hired is to go to e.g. LLVM or GCC meetup, and make it clear that you are looking for a job. Put it on your Github that you are looking for a job. Put a link to an LLVM or GCC (or similar) compiler phase that you have written. The next LLVM dev meeting is November 8-9 in San Jose, CA, hang out there, rest assured there will be many companies seeking to hire. Bonus points if you give a presentation, even if it's whimsy like compiling Brainfuck to Intel 4004 ... Another avenue is RISCV startups which are currently 10-a-penny, they all need and hire compiler engineers. Cold-contact them ...

PS, since you are a PhD student. I suggest finishing your PhD in some form or other. A lot of companies are loath to hire PhD students before they finish, or make the job offer contingent upon successful graduation. That certainly was our policy. If you are not yet near graduation, I suggest to do a compiler related internship.

[1] https://cakeml.org/

[2] https://github.com/AbsInt/CompCert

That’s interesting. When you do see a compiler writer online it seems that they usually complain that the work isn’t well paid compared to other programming roles.
go Bellard mode and write a tiny C compiler
There is a list of companies doing compiler work here: https://github.com/mgaudet/CompilerJobs . I would recommend surveying the ones that have openings, gathering the listed knowledge requirements, choosing the ones that come up most often and then learning that.
You work at MS, contact the Microsoft Research Centre, where C.A.R. Hoare works. Maybe ask to speak to him or another big name. Don't be afraid to ask[1]. Good luck!

[1] Shy bairns go hungry, goes some saying.

> My goal is to actually use the concepts I spent so much to learn in my PhD in my career.

Hmmm... That was me, 12 years ago, after having done a Ph.D. focussing on computational semantics (the nlp-kind, not the compiler-kind). Trying to apply it anywhere in industry has been my white whale ever since. I'd recommend de-emphasizing the "I'd like to work here to apply this incredibly specific thing that I've been working on for my Ph.D." angle in job interviews.

Agree fully. Yes, after a good dissertation, you are the world's expert on [title of your dissertation]. But you learned so much more getting that degree than is captured by that very narrow lens. So I would argue that if you try too hard to land The Job that maximizes your dissertation expertise, you will actually be wasting much of your degree.