-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
implement zeros() by calling calloc #130
Copy link
Copy link
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]help wantedIndicates that a maintainer wants help on an issue or pull requestIndicates that a maintainer wants help on an issue or pull requestperformanceMust go fasterMust go faster
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]help wantedIndicates that a maintainer wants help on an issue or pull requestIndicates that a maintainer wants help on an issue or pull requestperformanceMust go fasterMust go faster
There's a clever trick that we could use to create large zero matrices really fast: mmap the file
/dev/zero. This is, in fact, exactly what this "file" exists for. The benefit of doing this are:Since a fair amount of the time, no one actually touches most of the memory in a zeros array, this might be a big win. On the other hand, the drawbacks are:
zeros(), e.g. forones().