Skip to content

nimi-python APIs inefficiently allocate Python arrays #1998

@ni-jfitzger

Description

@ni-jfitzger

Description of issue

Our code is using a pattern like the following:
waveform_array_array = array.array("d", [0] * waveform_array_size)

While discussing #1997 , we discovered that it's much more efficent to allocate the array as follows (especially for large arrays):
waveform_array_array = array.array("d", [0]) * waveform_array_size

We should update all array allocations in the repo to follow this pattern. This affects multiple APIs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions