Skip to content

pjullrich/peterandcode

Back Add safe binary mutation demo with benchmark comparing safety tax

Commit details

Add safe binary mutation demo with benchmark comparing safety tax

Description

Same three scenarios as unsafe_demo.exs (shared ref, sub-binary, cross-process) but with :binary.copy/1 applied first — all pass. Includes a Benchee benchmark comparing unsafe in-place, safe copy+in-place, and the NIF-internal-copy approach, showing the safety tax is just one 8 MB memcpy. https://claude.ai/code/session_011hHr17m5LkPkM75FU47Hxj

Metadata

Author
Claude noreply@anthropic.com
Committed
Commit

Contributors

  • Claude noreply@anthropic.com Author