ref: 92747b6c52dda775dcc85002c06efab36d88cc4d
parent: 9855b5ed494d2a6759747b6cc22e6d43b35a8fd4
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Feb 19 07:23:06 EST 2018
Speed up std.clear
--- a/lib/std/clear.myr
+++ b/lib/std/clear.myr
@@ -1,4 +1,4 @@
-use "slfill"
+use "memops"
pkg std =
generic clear : (p : @a# -> void)
@@ -5,9 +5,6 @@
;;
generic clear = {p : @a#
- var bp
-
- bp = (p : byte#)
- slfill(bp[:sizeof(@a)], 0)
+ memfill((p : byte#), 0, sizeof(@a))
}