frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Show HN: I'm an airline pilot – I built interactive graphs/globes of my flights

https://jameshard.ing/pilot
246•jamesharding•1h ago•54 comments

XSLT – Native, zero-config build system for the Web

https://github.com/pacocoursey/xslt
312•_kush•9h ago•226 comments

Qwen VLo: From "Understanding" the World to "Depicting" It

https://qwenlm.github.io/blog/qwen-vlo/
3•lnyan•4m ago•0 comments

The Power and Beauty of Incrementalism

https://supernuclear.substack.com/p/the-power-and-beauty-of-incrementalism
26•surprisetalk•1h ago•6 comments

I Switched from Flutter and Rust to Rust and Egui

https://jdiaz97.github.io/greenblog/posts/flutter_to_egui/
140•jdiaz97•3d ago•66 comments

Parameterized types in C using the new tag compatibility rule

https://nullprogram.com/blog/2025/06/26/
79•ingve•9h ago•24 comments

Show HN: Zenta – Mindfulness for Terminal Users

https://github.com/e6a5/zenta
84•ihiep•6h ago•16 comments

PJ5 TTL CPU

https://pj5cpu.wordpress.com/
38•doener•7h ago•1 comments

Moonbase Alpha: That time NASA made a meme video game

https://www.spacebar.news/moonbase-alpha-nasa-video-game/
51•todsacerdoti•3d ago•12 comments

AlphaGenome: AI for better understanding the genome

https://deepmind.google/discover/blog/alphagenome-ai-for-better-understanding-the-genome/
476•i_love_limes•1d ago•155 comments

Launch HN: Issen (YC F24) – Personal AI language tutor

290•mariano54•1d ago•251 comments

Sailing the fjords like the Vikings yields unexpected insights

https://arstechnica.com/science/2025/06/this-archaeologist-built-a-replica-boat-to-sail-like-the-vikings/
91•pseudolus•3d ago•22 comments

Show HN: Sink – Sync any directory with any device on your local network

https://github.com/sirbread/sink
44•sirbread•8h ago•46 comments

Whitesmiths C compiler: One of the earliest commercial C compilers available

https://github.com/hansake/Whitesmiths-C-compiler
16•todsacerdoti•4d ago•4 comments

Calculating the Fibonacci numbers on GPU

https://veitner.bearblog.dev/calculating-the-fibonacci-numbers-on-gpu/
26•rbanffy•3d ago•12 comments

A Lisp adventure on the calm waters of the dead C (2021)

https://mihaiolteanu.me/language-abstractions
42•caned•3d ago•6 comments

The Effect of Noise on Sleep

https://www.empirical.health/blog/effect-of-noise-on-sleep/
38•brandonb•1h ago•18 comments

Alternative Layout System

https://alternativelayoutsystem.com/scripts/#same-sizer
301•smartmic•19h ago•39 comments

The time is right for a DOM templating API

https://justinfagnani.com/2025/06/26/the-time-is-right-for-a-dom-templating-api/
171•mdhb•19h ago•154 comments

Blazing Matrix Products

https://panadestein.github.io/blog/posts/mp.html
33•Bogdanp•8h ago•5 comments

Why is the Rust compiler so slow?

https://sharnoff.io/blog/why-rust-compiler-slow
233•Bogdanp•19h ago•276 comments

Starcloud can’t put a data centre in space at $8.2M in one Starship

https://angadh.com/space-data-centers-1
132•angadh•18h ago•209 comments

VA Tech scientists are building a better fog harp

https://arstechnica.com/science/2025/06/these-va-tech-scientists-are-building-a-better-fog-harp/
28•PaulHoule•3d ago•12 comments

A lumberjack created more than 200 sculptures in Wisconsin's Northwoods

https://www.smithsonianmag.com/travel/when-a-lumberjacks-imagination-ran-wild-he-created-more-than-200-sculptures-in-wisconsins-northwoods-180986840/
72•noleary•12h ago•31 comments

How much slower is random access, really?

https://samestep.com/blog/random-access/
96•sestep•3d ago•47 comments

Kea 3.0, our first LTS version

https://www.isc.org/blogs/kea-3-0/
105•conductor•18h ago•39 comments

Show HN: PILF, The ultimate solution to catastrophic oblivion on AI models

https://github.com/dmf-archive/PILF
3•NetRunnerSu•3h ago•0 comments

Snow - Classic Macintosh emulator

https://snowemu.com/
260•ColinWright•1d ago•86 comments

E.A. Spitzka's Studies of Exceptional and Deviant Brains (2024)

https://www.huntington.org/verso/ea-spitzkas-studies-exceptional-and-deviant-brains
13•Hooke•20h ago•1 comments

Show HN: Magnitude – Open-source AI browser automation framework

https://github.com/magnitudedev/magnitude
112•anerli•20h ago•38 comments
Open in hackernews

Calculating the Fibonacci numbers on GPU

https://veitner.bearblog.dev/calculating-the-fibonacci-numbers-on-gpu/
25•rbanffy•3d ago

Comments

lb-guilherme•4h ago
The algorithm here, fast doubling, is sequential (there is no parallelism) and is quite fast, with less than a hundred operations to arrive to the final result. This runs in nanosecond on a CPU and the benchmark in the article is mostly measuring the communication time rather than actual computation time.
Someone•4h ago
They also do not make use of the fact that matrix multiplication is associative, so M⁴ = M² × M², M⁸ = M⁴ × M⁴, etc. That means one can compute F32 using 5 matrix multiplications. This uses 31.

It wouldn’t surprise me at all if doing those 5 matrix multiplications on a CPU were faster than doing 31 on the GPU.

Also, FTA: “To calculate extremly large fibonacci numbers we need to avoid integer overflow. A simple way to avoid that is to just take everything modulo a given number in the matrix multiplication“

⇒ This also is NOT calculating the Fibonacci numbers, copping out when things get difficult on a GPU.

If you want to compute Fn mod some constant for 1 ≤ n ≤ some large constant fast on a GPU, I think I would compute quite a few of the intermediate matrices using the fast way, then spin up some ‘threads’ to compute the intermediate versions by copying those with the ‘standard’ matrix.

KeplerBoy•3h ago
The matrix in question is tiny (2x2). There's no hope a GPU would ever outperform a CPU on that.

It only gets interesting if you need a large matmuls or millions of small matmuls in parallel.

meindnoch•1h ago
They are unnecessarily filling a 99999999-sized array, only to print the last element and throw away the rest. Most of the time is going to be spent on filling this 400MB array.

Unintentionally, the article is a good cautionary tale of how algorithmic knowledge can beat raw hardware power, if you know what you're doing.

eesmith•4h ago
> Using the power of GPUs we are able to calculate F99999999 in only 17 milliseconds on my Consumer GPU

FWIW, on my 2020 era laptop, the following:

  #include <stdio.h>
  
  int main(void) {
    int a = 1, b = 1, c, n = 99999999;
    while (--n) {
      c = (a+b) % 9837;
      a = b;
      b = c;
    }
    printf("%d\n", a);
    return 0;
  }
takes 330 ms measured as "time a.out".

The problem with Fibonacci is there are algorithmic ways to speed things up. The following (using the method at https://en.wikipedia.org/wiki/Fibonacci_sequence to compute Fibonacci numbers recursively in O(log n) arithmetic operations) takes Python 0.1 ms to compute the same value:

  import functools

  @functools.cache
  def F(n):
      if n <= 2:
          return 1

      m = n // 2 # rounds down
      if n % 2:
          # odd
          return (F(m+1)**2 + F(m)**2) % 9837
      else:
          return ((2*F(m+1) - F(m))*F(m)) % 9837

  print(F(99999999))
amelius•2h ago
Maybe a better test is digits of Pi?

Or recursive hashing?

staunton•2h ago
A test of what?
amelius•2h ago
Test of your GPU approach/library versus CPU.
eesmith•1h ago
I think the author is more interested in showing how to implement a certain problem using a GPU approach than to test a GPU approach vs. a CPU one.

As mentioned, the topic comes from an end-of-chapter problem set on prefix sums, at https://www.cs.cmu.edu/~guyb/papers/Ble93.pdf .

A prefix sum cam be implemented using a GPU, as demonstrated.

However, using a prefix sum may not be the best way to compute Fibonacci numbers. As demonstrated.

qsort•1h ago
Well, there's a closed formula right? I wonder if it's faster to carry out the computation in Z[sqrt(5]).
seanhunter•2m ago
Yes. Binet’s formula https://mathworld.wolfram.com/BinetsFormula.html
meindnoch•1h ago
They are calculating F(99999999) mod 9837. This can be done by 54 matrix multiplications of 2x2 matrices. It takes nanoseconds on a CPU. There's absolutely no point in using the GPU for this.