<INSTRUCT>{"boostrap":"short-term-mem"} λm s. if size(m) > CACHE then chunk(m, CACHE, s)…
- User
{"boostrap":"short-term-mem"} λm s. if size(m) > CACHE then chunk(m, CACHE, s) else access(m, s)
- Assistant
This is an instruction for a function that takes a matrix
mand a valuesas inputs. The function is intended to optimize the performance of memory access operations for a fixed cache sizeCACHE.The function first checks the size of the matrix
m. If the size is greater than the cache sizeCACHE, it chunks the matrix into smaller submatrices of sizeCACHEand returns the submatrix that corresponds to the given indexs. Otherwise, the function simply returns the element at indexsin the original matrixm.This instruction can be used in memory-intensive programs where frequent access to large matrices is required. By optimizing the memory access operations, the program can run faster and consume less memory.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.