←back to thread

Scala 3 slowed us down?

(kmaliszewski9.github.io)
261 points kmaliszewski | 1 comments | | HN request time: 0s | source
Show context
munchler ◴[] No.46183417[source]
I’m not familiar with Scala’s macro system, but it seems like a big takeaway here is: Be careful with code that invokes the compiler (JIT) at runtime. That seems like it’s asking for trouble.
replies(1): >>46183886 #
dtech ◴[] No.46183886[source]
Macro's are compile time, there is no runtime codegen.

The problem was overly-frequent inlining generating enormous expressions, causing a lot JIT phase and slow execution.

replies(2): >>46183957 #>>46185245 #
gavinray ◴[] No.46185245[source]
That's not true, Spark's entire query engine relies on use of runtime codegen via macros/quasi quotes

Look up the architecture of Catalyst + Tungsten

https://www.databricks.com/glossary/catalyst-optimizer

replies(2): >>46187183 #>>46211270 #
1. lmm ◴[] No.46187183[source]
Catalyst uses runtime codegen, sure, but the OP wasn't using that.