Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cylon13
on Sept 15, 2023
|
parent
|
context
|
favorite
| on:
How to store a chess position in 26 bytes using bi...
Is your assertion that it takes more time for a CPU to read values out of a 30 byte struct and do a couple shifts and branches than to parse a JSON representation?
hutzlibu
on Sept 15, 2023
|
next
[–]
The JSON needs to be parsed only once. Then it is (or can be) just any object to your liking.
JSON is for storing data as text. Not work with that text all the time.
croes
on Sept 15, 2023
|
prev
[–]
It's not just reading, you need to process the data to get castling availability, en passant target etc.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: