logoalt Hacker News

ameliustoday at 1:13 PM5 repliesview on HN

Decimal strings are for human consumption, I suppose. Not sure if the nanosecond timescale is relevant then (unless you send these numbers to billions of people which is unlikely). Sounds like a pointless exercise, or maybe they should have picked a better example.


Replies

bee_ridertoday at 4:56 PM

I do sort of agree that, at some point, there arrives a question of “are we sure we need to convert the ints to strings?” But it also serves as a convenient excuse to write fast AVX-512 code (practice and show off tricks if nothing else), the objective is immediately obvious (no need for intense numerical proofs). I like it.

pipe2devnulltoday at 1:15 PM

Wow that’s a bit harsh. You can’t think of any examples where you may need to send a string to something but want to do it quickly?

show 1 reply
whiatptoday at 5:04 PM

Many large distributed systems are built around pushing data through web requests, and human readable request/response formats (JSON, XML) are the most popular, and require integer to string conversions for serialization.

teo_zerotoday at 2:36 PM

You assume that human consumption means immediate human consumption.

By this metric, there's no need for video encoders faster than the movie's own FPS, either.

analog31today at 1:43 PM

I can imagine a time in the near future when the conversion of integers to decimal strings becomes a limit to the rate at which AI can generate text that's not worth reading.