summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-02-19 12:23:06 -0800
committerOri Bernstein <ori@eigenstate.org>2018-02-19 12:23:06 -0800
commit92747b6c52dda775dcc85002c06efab36d88cc4d (patch)
tree17379aa3ccf6cb8cfa41e71c99e7d91221866795
parent9855b5ed494d2a6759747b6cc22e6d43b35a8fd4 (diff)
downloadmc-92747b6c52dda775dcc85002c06efab36d88cc4d.tar.gz
Speed up std.clear
-rw-r--r--lib/std/clear.myr7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/std/clear.myr b/lib/std/clear.myr
index 718131e..0f77bef 100644
--- a/lib/std/clear.myr
+++ b/lib/std/clear.myr
@@ -1,13 +1,10 @@
-use "slfill"
+use "memops"
pkg std =
generic clear : (p : @a# -> void)
;;
generic clear = {p : @a#
- var bp
-
- bp = (p : byte#)
- slfill(bp[:sizeof(@a)], 0)
+ memfill((p : byte#), 0, sizeof(@a))
}