How to Write Unmaintainable (But Wicked Fast!) Code on the JVM by John A. De Goes

preview_player
Показать описание
In the majority of cases, developer productivity matters more than performance, and writing high-level code can help you ship code faster, with fewer defects and a lower cost of maintenance. When performance matters, however, as for low-latency or high-throughput applications, it really matters!

In this presentation, John A. De Goes, the architect of the ZIO library, gives you his top 3 techniques for writing low-level, high-performance code on the JVM. With simple explanations and plenty of code snippets, you'll be writing unmaintainable (but screaming fast!) code in no time!
Рекомендации по теме
Комментарии
Автор

That was very exciting, thanks a lot!))

robert
Автор

This the type of things you want your compiler / JIT compiler do for you. Otherwise, you just go back to C++ concerns like avoiding V-Tables. How the "manual V-table" approach is faster than the runtime dynamic lookup is still surprising to me!

TheDarkyzz
Автор

Quite useful, thanks for sharing. As a former c++ engineer I find this exciting and painful at the same time.

vvviiimmm
Автор

Would it in principle be possible for the Scala compiler to rewrite everything in terms of Arrays, primitive types, static dispatches, etc?

kevalan
Автор

It's nifty to learn about the inner workings of Scala just to know what's really going on behind the curtain.

markhathaway
Автор

AnyVal don't save you from a boxing and allocations if there is match, list or cast in runtime

OMGSirius
Автор

In short, perf code is going backwards - throw out your abstractions that you are aiming for at the beginning (for readability, beauty or whatever reasons)
bytecode transformations with GraalVM can help here, but I'm thinking can the compiler do the job for you (here what John is doing is sort of optimization compiler step)

And as was mentioned at the beginning, this techniques have to be done only on the hot spots; here's where compiler won't help you unless it's done via some hints like custom annotations.. so welcome to runtime ;)

MsEvgeniyK
Автор

I think that this opts are a bad idea for us ( business programmers), because we need a more powerful concepts like ZIO to write a fast and a maintainable code.

OMGSirius