Why is Swift so slow (timeout) in compiling this code?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

    This comment suggests otherwise:

    https://github.com/ziglang/zig/issues/89#issuecomment-122118...

    Although I'm not sure the "self hosted compiler" is the same as "llvm free backend".

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. rust

    Empowering everyone to build reliable and efficient software.

    Since Rust 1.67.0, the compiler has a specific optimized code path for the (already older) include_bytes! macro: https://github.com/rust-lang/rust/pull/103812#issuecomment-1...

  4. w64devkit

    Portable C and C++ Development Kit for x64 (and x86) Windows

    FWIW, both GNU objcopy and GNU ld (including e.g. the XCOPY-deployable ones from w64devkit[1]) are perfectly capable[2] of turning binary data into MSVC-acceptable COFF files with start and end symbols, while Free Pascal, for example, straight up ships with a bin2obj tool; the MSVC toolset is the outlier here.

    [1] https://github.com/skeeto/w64devkit

    [2] https://www.devever.net/~hl/incbin

  5. language

    Design of the Dart language

    I implemented a prototype version of the algorithm in that paper when exploring exhaustiveness checking for pattern matching in Dart.

    I found it pretty easy to understand, but also really easy to get it to generate huge combinatorially large spaces. Some careful memoization and deduplication helped, but even so I never got the performance to a state I considered acceptable.

    Instead, I went with Luc Maranget's classic approach and figured out a way to adapt it to a language with subtyping (with a ton of work from Johnni Winther to figure out all of the hard complex cases around generics):

    https://github.com/dart-lang/language/blob/main/accepted/fut...

    The performance (in the prototype!) was dramatically better. You can always make pattern matching go combinatorial, but I haven't seen any real-world switches get particularly slow with our approach yet, and we have some fairly large tests of matching on tuples of enums.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts