proposal: slices: new package to provide generic slice functions · Issue #45955

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Weaviate

    Weaviate is an open-source vector database that stores both objects and vectors, allowing for the combination of vector search with structured filtering with the fault tolerance and scalability of a cloud-native database​.

  • For example, take this loop in a dot product function which we had to write in Assembly because what the Go compiler produced wasn't fast enough. The reason it's in assembly is because we can use AVX FMA instructions, but notice how the loop is unrolled 4 times. This unrolling actually brought about as much performance gain as the AVX instructions itself. From what I understand the compiler also does unrolling on regular Go for loops. So, if the additional functional call would prevent the unrolling, this could be a quite noticeable performance penalty.

  • go

    The Go programming language

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ply

    Painless polymorphism (by lukechampine)

  • I still believe that Go is better served by a handful of new builtins, plus ergonomics lambdas, than full-blown user-defined generics. In particular, adding map/filter as builtins would allow for deep compiler optimization. In Ply I was able to transform chains like xs.morph(square).filter(even) into a single for loop with no intermediate slice allocations.

  • filter

    Simple apply/filter/reduce package.

  • From https://github.com/robpike/filter:

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