why doesn't libsecp256k1 support point addition
It does, it's called pubkey_combine and can add multiple points.
It might be a little overkill if you use it in a long loop / a lot of times, though. Depending on your use case there can be much faster custom ways to do it though.
I'm trying to make a c++ script to compute the points between scalars 1 to 1 billion and store the x value and the scalars in txt files based on the first 4 characters of x , but i have two problems that makes the process very slow .
1. libsecp256k1 Can't keep adding g to itself repeatedly ,it cant handle the same point being added
2. The core problem that slow it down , we can't open 16^4 files in the same time we are limited to 3200 , and we don't know what the next point prefix will be so we can't choose which files to open ,and opening only 1 file at a time is very very slow , the speed is 1000 point per 5s