Better HN
topnewbestaskshowjobs
Log inSign up

dpayne

101 karma · joined Oct 14, 2012 (14y ago) · 13 submissions

Submissions

comment 3y ago · link · parent

I still use copilot as my main completion tool. I found ChatGPT to be too slow and expensive to use for tab complete level of usage, but it works really well for larger things (e.g. refactor X to do Y, or write unit tests).

You can get your API key here https://platform.openai.com/account/api-keys.

2.

Show HN: CodeGPT.nvim – ChatGPT plugin for Neovim(github.com ↗)

228 points · by dpayne · 3y ago · 47 comments

3.

Show HN: Faster HyperLogLog Implementation(github.com ↗)

1 points · by dpayne · 7y ago · discuss

comment 8y ago · link · parent

One way I've found to isolate this is to turn off turbo boost and underclock the cpu, while making sure the avx offset is set to 100%. While you would never want to run a production system like this, it does help to eliminate any issues with cpu throttling. If the avx-512 version of the program still runs slower then something else is interfering besides cpu throttling.

comment 9y ago · link · parent

There are many high schools like this in the U.S. that are state funded, both in very liberal and very conservative states.

comment 11y ago · link · parent

Recompiling without fastmath gives the same answer as the article "3.1415926545880506".

  mac >> clang++ -O3 -march=native main.cpp
  mac >> ./a.out
  3.1415926545880506
  total time taken is: 4.3861569999999999s
Twice as slow as the fastmath version but still faster than the go version.

comment 11y ago · link · parent

Great article on the complexities of investigating performance issues! Another very interesting surprise is when I run this locally on my macbook, clang is much faster

  mac >> go run main.go
  approximating pi with 1000000000 iterations.
  3.1415926545880506
  total time taken is: 9.706911232s

  mac >> clang++ -O3 -ffast-math -march=native main.cpp
  mac >> ./a.out
  3.1415926545864963
  total time taken is: 2.14196s

comment 11y ago · link · parent

One caveat of perfect hash functions, including CMPH, is that for a very large amount of keys the data structs they use internally become very large. In the case of CMPH when I tried with around 30 million keys the result was several MBs which caused it to not fit in L3 cache. For large dictionaries, hash functions like xxhash and farmhash are usually a better option than the perfect hash functions.

comment 13y ago · link · parent

Here's another one of his projects where you can write ruby script using just underscores. https://github.com/mame/_

comment 13y ago · link · parent

spf13 is a great plugin bundle for vim that got me started using relative line numbering. It's great for the lazy person who doesn't want to bother setting up all the fancy vim plugins and settings.

https://github.com/spf13/spf13-vim

comment 13y ago · link · parent

Meh, I knew the days of tax free internet purchases would end some day.

comment 13y ago · link · parent

Looks great, but the price is exorbitantly high for a large number of users :(