Skip to content

mapreduce allocates a lot on the CPU #211

@ViralBShah

Description

@ViralBShah

I was expecting fewer allocations, and much faster speed for sum(Vector), but I am not sure what to compare it to.

## GPU

julia> a = Metal.ones(Float32, 10^8);

julia> @time sum(a)
  0.017176 seconds (980 allocations: 23.758 KiB)
1.0f8

## CPU

julia> b = ones(Float32,10^8);

julia> @time sum(b);
  0.014090 seconds (1 allocation: 16 bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraysThings about the array abstraction.performanceGotta go fast.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions