opt_memory_alloc: Optimizer: Memory Allocation.

View source: R/opt-memory-alloc.R

opt_memory_allocR Documentation

Optimizer: Memory Allocation.

Description

Performs one memory allocation pass. Carefully examine the results after running this function!

Usage

opt_memory_alloc(code)

Arguments

code

A list of character vectors with the code to optimize.

Examples

code <- paste(
  "v <- NULL",
  "for (i in 1:5) {",
  "  v[i] <- i^2",
  "}",
  sep = "\n"
)
cat(opt_memory_alloc(list(code))$codes[[1]])

jcrodriguez1989/rco documentation built on Nov. 12, 2024, 12:23 p.m.