Opened 11 years ago

Last modified 11 years ago

#2023 closed defect

Const arguments — at Initial Version

Reported by: tuan kuranes Owned by:
Priority: Nice to Have Milestone:
Component: Core engine Keywords: patch
Cc: Patch:

Description

  • Passing larger than 4-byte values by reference to avoid copy-on-move and temporary objects.
  • const size_t* const is but a way to point for aliasing and therefore "restrict" optimisations and use. (themself leading to potential openmp "optimisations spot")
  • "int getStuff(const size_t arg)" is more developper safeguard and code documentation than real perf. (preventing people using args as local vars and easing code reading, by pointing possible optimisation when code evolves)

Change History (1)

by tuan kuranes, 11 years ago

Attachment: const.patch added

patch

Note: See TracTickets for help on using tickets.