Open solardiz opened 6 months ago
OTOH, in all of those places we use SECP256K1_CONTEXT_NONE
, which may skip much of the initialization, and maybe our uses are such that they don't require nor trigger further initialization. If so, the performance impact may not be that bad, but following the comment's advice is probably desirable anyway.
A comment in
secp256k1/secp256k1.h
says:In
bitshares_fmt_plug.c
,electrum_fmt_plug.c
,opencl_electrum_modern_fmt_plug.c
, we currently recreate the context for each use. We should optimize these formats to use either one shared context structure, or per-thread ones, but not recreated/destroyed each time.