←back to thread

129 points arkohut | 3 comments | | HN request time: 0.469s | source
1. moltar ◴[] No.42165442[source]
How’s the performance with Python? What’s the overhead?
replies(2): >>42165518 #>>42169941 #
2. traverseda ◴[] No.42165518[source]
Have you used much python, or are you just buying into the "python slow" memes?

Unless they've done something very very wrong performance will be fine. This isn't doing anything where python's overhead would matter.

It's glueing together some highly optimized code written in other languages, or using python as a DSL to interface with highly optimized libraries like numpy, or generate highly optimized assembly with something like JAX, or if they're really fancy compiling a restricted subset directly to GPU shaders or something.

Python is plenty fast for most stuff, and when it isn't it has one of the best pathways towards optimization.

3. arkohut ◴[] No.42169941[source]
In fact, this project is indeed very computing-consuming, but it’s not Python’s fault. The main reason lies in the use of several machine learning models:

  1. OCR model
  2. Embedding model
  3. VLM model (optional)
I’ve tried many optimization approaches to ensure it doesn’t affect daily usage, though this comes at the cost of reduced search performance.