Hacker News new | ask | show | jobs
by creamytaco 1955 days ago
Why would one choose Python for this instead of Go or Rust?

I imagine Python performance would be terrible.

5 comments

The idea was to illustrate the concepts of an inverted index and tf-idf :-) I've built some stuff like this for a smaller project written in Python because it was Easierâ„¢ than spinning up an Elasticsearch cluster (ie it definitely didn't need to scale :-D)
Yes, I've been really interested in FTS recently and love articles like this. I'm currently implementing a paired-down version myself in Elixir because I'm searching one "table" (not postgres) and I don't want to bring in external dependencies for it.
Because it's easier for the average developer to follow Python code? This is a tutorial/demo, not a library.
The article is good and so can be applied to any language, also Python is not that slow.
As a lot of the work is done by code library code, there's a very good chance that the code is not all that slow.
If the dataset is small, speed doesn't matter. Also, there's PyPy if you need speed.