Y
Hacker News
new
|
ask
|
show
|
jobs
by
akx
1340 days ago
A good start would be to not do silly things like
body = request.json key = json.dumps(body)
in the prediction code to begin with:
https://github.com/postgresml/postgresml/blob/15c8488ade86b0...
2 comments
levkk
1339 days ago
If I turn that into a single line and that improves performance 40x... I will probably not do engineering for a while after that.
link
learndeeply
1339 days ago
The parent comment said it would be "a good start". It's like adding sleep(1000) to a benchmark to purposely make it look worse than your own product.
link
polskibus
1340 days ago
asking as a person that does not use Python every day - what would be a better solution here?
link
manfre
1340 days ago
request.json is converting the request payload from a str to a dict. json.dumps converts it back to a str.
link