HN user

teepark

11 karma

[ my public key: https://keybase.io/teepark; my proof: https://keybase.io/teepark/sigs/V_eB8MjygEYRqms5whIXqKLSossTrlm-nJ-3NswHujY ]

Posts2
Comments8
View on HN

Yeah, of course if you're just running through an in-memory slice and doing a little arithmetic on each item, sentinel errors and errors.Is might dominate your runtime. But the dominant use-cases (e.g. in the standard library) are syscalls, filesystem interactions, network APIs - you know, stuff that takes real time.

This reminds me of "latency numbers every programmer should know". Work with the standard library and other well-conceived go projects and you gain the intuition that error handling and bit-twiddling arithmetic don't belong together. That's the real story here, and OP's article is way wide of the mark.

Comparing to the speed of a direct boolean check is a great way to sensationalize really small numbers.

Nobody's real-world code is being slowed down by 500% because all real world code is doing much more than just checking errors. All I see from these results is a 15-16ns cost to using errors.Is versus an additional boolean.

Even the examples ("GetValue") hint at an extremely common use case: reads from a data store. A case where single-digit milliseconds is considered "all good performance-wise" for the most common SQL databases, clocking in at 100000x the time scale of errors.Is.

But while it points out that the evidence for masks being effective is scarce, it does little to identify positive evidence that masks are specifically ineffective. So we just don't know as much as CDC's consistent guidelines seem to suggest, and it makes sense to weigh the risk. That the article neglects to frame it in this light highlights the one-sided nature.

Facta | San Francisco, Salt Lake City | Go, serverless AWS, React, Typescript | https://facta.io | https://jobs.lever.co/facta

Facta is modernizing the CFO stack for mid-market companies, starting with accounting's month-end close. Come help us empower some of the most undervalued employees (accounting, controllers, finops teams) with tools that automate away their tedious manual workflows.

We are looking for product managers, designers, sales, and engineers.

Facta | Engineering, Product, & Design Roles | SF, Utah, Remote | https://facta.io

Fintech | Typescript, React, Go, serverless AWS

Facta is empowering finance and accounting professionals with a suite of modern software tools that work in tandem with general ledger services to speed up monthly close, get their teams out of spreadsheets, and get critical finance data in front of decision makers faster.

See our open roles at https://jobs.lever.co/facta

http://linux.die.net/man/2/fcntl

actually it could use row-level locking since it uses row-oriented storage and fcntl locks can be applied to a set of bytes within a file. it could also do file-level locking on tempfiles with names derived from the table name and primary key of the row.

anyone with actual knowledge of it care to chime in with what it does do?