mirror of https://github.com/ecmwf/eccodes.git
BUFR Performance: reduce function call overhead
This commit is contained in:
parent
c6850eeed7
commit
d0b7b2e31f
|
@ -454,11 +454,7 @@ int grib_trie_with_rank_insert(grib_trie_with_rank* t, const char* key, void* da
|
||||||
{
|
{
|
||||||
grib_trie_with_rank* last = t;
|
grib_trie_with_rank* last = t;
|
||||||
const char* k = key;
|
const char* k = key;
|
||||||
|
DebugAssert(t);
|
||||||
if (!t) {
|
|
||||||
Assert(!"grib_trie_with_rank_insert: grib_trie==NULL");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
GRIB_MUTEX_INIT_ONCE(&once, &init);
|
GRIB_MUTEX_INIT_ONCE(&once, &init);
|
||||||
GRIB_MUTEX_LOCK(&mutex);
|
GRIB_MUTEX_LOCK(&mutex);
|
||||||
|
@ -489,7 +485,7 @@ int grib_trie_with_rank_insert(grib_trie_with_rank* t, const char* key, void* da
|
||||||
grib_oarray_push(t->context, t->objs, data);
|
grib_oarray_push(t->context, t->objs, data);
|
||||||
/* grib_trie_with_rank_insert_in_list(t,data); */
|
/* grib_trie_with_rank_insert_in_list(t,data); */
|
||||||
GRIB_MUTEX_UNLOCK(&mutex);
|
GRIB_MUTEX_UNLOCK(&mutex);
|
||||||
return grib_oarray_used_size(t->objs);
|
return t->objs->n; /* grib_oarray_used_size(t->objs) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue