Skip to content

Would optimizing with SIMD friendly typed lists work? #89

@antont

Description

@antont

EDIT: just realized the this already uses vector_math for the types, just not in arrays. I could experiment and see if it affects the perf, I think it does via memory layouts.


Hi, and thanks for the nice package, we just started using it and the perf is probably fine for the 100 particles we use now.

However I'm curious, would it work to optimize this by making the particle positions and velocities SIMD friendly typed lists, and using array operations to apply the updates to those in one go? I think that's how particle systems are often made, and how e.g. numerical python achieves great performance with array operations.

I could try this out for fun, also to learn a bit for Dart and Flutter, if it would make sense.

Am thinking the particle data arrays could use https://api.dart.dev/stable/3.1.3/dart-typed_data/Float32List-class.html

And maybe use this lib for operations,
https://pub.dev/documentation/vector_math/latest/vector_math_operations/Matrix44SIMDOperations/multiply.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions