Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Vectorized and performance-portable Quicksort(googleblog.com ↗)
    17comments
  2. Small programming tricks(will-keleher.com ↗)
    120comments
  3. Training a 4B model to produce 81% faster query plans than Postgres(rohanbansal.com ↗)
    4comments
  4. Accurate Models of AMD Matrix Cores(arxiv.org ↗)
    discuss
  5. Dream-RSI: Recursive Self-Improvement through Evolving Worlds(arxiv.org ↗)
    44comments
  6. Mistral X Mozilla: Private, Multilingual AI Browsing(mistral.ai ↗)
    164comments
  7. Tell the speakers that you liked their talks(ohhelloana.blog ↗)
    51comments
  8. Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations(github.com/arnegiacomo ↗)
    229comments
  9. Fed hikes rates as inflation worries push up bond yields(reuters.com ↗)
    9comments
  10. How big are factorials?(thegreenplace.net ↗)
    23comments
  11. Learning Programming in an Age of LLMs(ploeh.dk ↗)
    147comments
  12. The Siberian Ice Maiden and the Scythian World(patrickwyman.substack.com ↗)
    discuss
  13. ER visits for gambling disorders doubled after expanded online gambling market(utoronto.ca ↗)
    73comments
  14. Claude Cowork and chat are now one Claude(claude.com ↗)
    161comments
  15. A coffee shop owner used AI to make a menu poster. Then came the angry DMs(businessinsider.com ↗)
    4comments
  16. The DeepMind Institute(deepmind.com ↗)
    23comments
  17. How good are frontier models at physics?(arxiv.org ↗)
    2comments
  18. Hackers Got Inside a Flock Camera(wired.com ↗)
    179comments
  19. The Google Play app review process now regularly takes longer than a week(gultsch.social ↗)
    291comments
  20. GitHub is having trouble counting things(chuckgreenman.com ↗)
    29comments
  21. Kyber (YC W23) Is Hiring a Forward Deployed Engineer(ycombinator.com ↗)
    discuss
  22. Can we stop with the uptime percentages?(jim-nielsen.com ↗)
    81comments
  23. Why a fast-growing German AI startup is moving its parent company from the US(euronews.com ↗)
    1comments
  24. Show HN: How Stale Is Your AI? Release age and training cutoff for 20 models(stale.jock.pl ↗)
    39comments
  25. Salesforce Global Outage(salesforce.com ↗)
    149comments
  26. Anatomy of a Texture(agentlien.github.io ↗)
    9comments
  27. This Code Is CRAP (2011)(googleblog.com ↗)
    44comments
  28. A warning about 'model welfare'(mustafa-suleyman.ai ↗)
    296comments
  29. Show HN: I made a flight simulator, except you're just a passenger(inflightsimulator.com ↗)
    196comments
  30. Scaling Golang CI by Replacing actions/setup-go(cloudx.ai ↗)
    16comments

Vectorized and performance-portable Quicksort

111 pointsby 1h agoopensource.googleblog.com
17 comments
49m agoHN ↗

(2022)

If you're curious why you would want a vectorized way to sort lists of numbers, one use case is building histograms - it's much easier to build a histogram if you've sorted all your samples first

40m agoHN ↗

(2002)

I wonder what apps have implemented this now that a few years have passed.

42m agoHN ↗

Honestly part of me feels that way about way too many things in retrospect about my own life and interests.

30m agoHN ↗

i read that and thought the same. actual based idea its even inspired me to log off

33m agoHN ↗

Actual title: “Vectorized and performance-portable Quicksort” (2022).

Actual sense in which it’s first:

Happily, modern instruction sets (Arm SVE, RISC-V V, x86 AVX-512) include a special instruction suitable for partitioning. Given a separate input of yes/no values (whether an element is less than the pivot), this "compress-store" instruction stores to consecutive memory only the elements whose corresponding input is "yes". We can then logically negate the yes/no values and apply the instruction again to write the elements to the other partition. This strategy has been used in an AVX-512-specific Quicksort. But what about other instruction sets such as AVX2 that don't have compress-store? Previous work has shown how to emulate this instruction using permute instructions.

We build on these techniques to achieve the first vectorized Quicksort that is portable to six instruction sets across three architectures, and in fact outperforms prior architecture-specific sorts.

28m agoHN ↗

Our implementation uses Highway's portable SIMD functions, so we do not have to re-implement about 3,000 lines of C++ for each platform.

Would they do the same thing today or have an LLM re-implement those 3000 lines of c++ ?

24m agoHN ↗

Id say that it is a lot more likely for the in-house, at least half a decade old library to be correct and performant than 3000 lines of an LLMs mediocre regurgitation of that code.

19m agoHN ↗

Guys, remember when language features allowed re-usability?

26m agoHN ↗

Well, it came out a while ago, so maybe we can be a bit silly:

There’s something sort of beautiful about mergesort and heapsort. Their names tell you what their main idea is, and how they work is immediately obvious.

Quicksort, on the other hand, has nothing beautiful about it and is named after it’s one redeeming feature (that it is quick for a lot of cases).

24m agoHN ↗

Definitely needs (2022) in the title, I was a bit confused!

15m agoHN ↗

only sorts numbers? wouldn't radix be much better?

12m agoHN ↗

Just imagine when candidates will get asked by pre-revenue startups to implement a vectorized version of quick-sort in person in 10 mins, just for a SWE job which they do not use this themselves.

Only the likes of MAG 7, and a couple of hedge-funds would ask to do it since this problem directly applies to them.

But certainly not pre-revenue startups.

11m agoHN ↗

this was made like 4 years back most of the current algorithms use this already !