Skip to content

Commit

Permalink
minor fix in malloc terminology used in docs (JuliaLang#52665)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-netto committed Dec 29, 2023
1 parent e8f8968 commit 2b2f534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/src/manual/performance-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ a vector of 64-bit floats so there should be no need to allocate (heap) memory.

We should clarify that what `@time` reports is specifically *heap* allocations, which are typically needed for either
mutable objects or for creating/growing variable-sized containers (such as `Array` or `Dict`, strings, or "type-unstable"
objects whose type is only known at runtime). Allocating (or deallocating) such blocks of memory may require an expensive
system call (e.g. via `malloc` in C), and they must be tracked for garbage collection. In contrast, immutable values like
objects whose type is only known at runtime). Allocating (or deallocating) such blocks of memory may require an expensive function
call to libc (e.g. via `malloc` in C), and they must be tracked for garbage collection. In contrast, immutable values like
numbers (except bignums), tuples, and immutable `struct`s can be stored much more cheaply, e.g. in stack or CPU-register
memory, so one doesn’t typically worry about the performance cost of "allocating" them.

Expand Down

0 comments on commit 2b2f534

Please sign in to comment.