Aussie AI

Function Slugs

  • Book Excerpt from "Generative AI in C++"
  • by David Spuler, Ph.D.

Function Slugs

Functions are an important building block of your code. Some ways to get the slugs out of functions include:

  • Declare small functions inline.
  • Avoid recursion.
  • Pass objects by reference.
  • Avoid function pointers.
  • Specialize functions with default arguments.

 

Next:

Up: Table of Contents

Buy: Generative AI in C++: Coding Transformers and LLMs

Generative AI in C++ The new AI programming book by Aussie AI co-founders:
  • AI coding in C++
  • Transformer engine speedups
  • LLM models
  • Phone and desktop AI
  • Code examples
  • Research citations

Get your copy from Amazon: Generative AI in C++