Skip to content

Speed up NCDEFAULT_get/put_vars code #1381

@DennisHeimbigner

Description

@DennisHeimbigner

It occurs to me that we should consider improving
the performance of NCDEFAULT_get/put_vars since they
are still being used for some dispatch tables.

The current implementations operate by reading/writing
one element at a time, which is seriously inefficient.

We should explore some alternative implementations such as this.

  1. Instead of reading element at a time, we allocate some larger
    block of memory that covers multiple strided elements at a time.
  2. the stride code then reads one of these blocks and extracts the
    relevant strided elements.
  3. Cost is memory of the block (per-call to get_vars). - should
    we keep a blockcache
  4. For writing, we would read the block, then insert the
    strided elements, and then write out the whole block.

Anyone have any other suggestions for speed up?

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions