Closed alexanderkoumis closed 6 years ago
This is because the CURL object is initialized/cleaned up for every single request. I made a modification to only perform the initialization once and it performed on par with the Python version. Pull request coming soon.
Pull request merged
This C++ API is slower than other Binance interfaces (python-binance) because of the poor performance of libcurl. I timed reading the
ticker/allBookTicker
endpoint from two small programs in both C++ (with this API) and python (using python-binance):The Python example grabs the data almost always 3-4x faster than the C++ code, with the Python code running in about 200ms and the C++ version taking ~800ms. This line, calling out to the libcurl API, is the slowest part of the binacpp library function. Why is libcurl so much slower here than the Python requests package?