license
This commit is contained in:
5
LICENSE
Normal file
5
LICENSE
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Copyright (C) 2023 by Humza Shahid <humzasaur@gmail.com>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Brolib-sml
|
||||||
|
|
||||||
|
Standard ML port of [this](https://github.com/hummy123/brolib) rope implementation.
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
All files except rope.sml (written by me) were genereated from the repository below.
|
|
||||||
https://github.com/josephg/editing-traces/tree/master/sequential_traces
|
|
||||||
|
|
||||||
The files in that repository are all licensed under CC BY 4.0, except for the Automerge edit trace which was taken from the below repository, where I do not see a license.
|
|
||||||
https://github.com/automerge/automerge-perf/
|
|
||||||
|
|
||||||
rope.sml is licensed under the Zero Clause BSD license described at the link below.
|
|
||||||
https://landley.net/toybox/license.html
|
|
||||||
50
utils.sml
50
utils.sml
@@ -50,17 +50,47 @@ fun run_to_string_time title rope =
|
|||||||
time_func title f
|
time_func title f
|
||||||
end
|
end
|
||||||
|
|
||||||
val _ =
|
fun run_txns_1000_times counter arr acc =
|
||||||
let
|
if counter = 1000 then
|
||||||
val svelte = run_txns_time "svelte" svelte_arr
|
acc
|
||||||
val rust = run_txns_time "rust" rust_arr
|
else
|
||||||
val seph = run_txns_time "seph" seph_arr
|
let
|
||||||
val automerge = run_txns_time "automerge" automerge_arr
|
val start_time = Time.now()
|
||||||
|
val start_time = Time.toMilliseconds start_time
|
||||||
|
|
||||||
val _ = run_to_string_time "svelte to_string" svelte
|
val _ = run_txns arr
|
||||||
val _ = run_to_string_time "rust to_string" rust
|
|
||||||
val _ = run_to_string_time "seph to_string" seph
|
val end_time = Time.now()
|
||||||
val _ = run_to_string_time "automerge to_string" automerge
|
val end_time = Time.toMilliseconds end_time
|
||||||
|
val time_diff = end_time - start_time
|
||||||
|
val time_diff = LargeInt.toString time_diff
|
||||||
|
in
|
||||||
|
run_txns_1000_times (counter + 1) arr (time_diff::acc)
|
||||||
|
end
|
||||||
|
|
||||||
|
fun write_file filename acc =
|
||||||
|
let
|
||||||
|
val str = String.concatWith "," acc
|
||||||
|
val fd = TextIO.openOut filename
|
||||||
|
val _ = TextIO.output (fd, str) handle e => (TextIO.closeOut fd; raise e)
|
||||||
|
val _ = TextIO.closeOut fd
|
||||||
|
in
|
||||||
|
()
|
||||||
|
end
|
||||||
|
|
||||||
|
val _ =
|
||||||
|
let
|
||||||
|
val svelte = run_txns_1000_times 0 svelte_arr []
|
||||||
|
val _ = write_file "svelte_edit_traces.csv" svelte
|
||||||
|
|
||||||
|
val rust = run_txns_1000_times 0 rust_arr []
|
||||||
|
val _ = write_file "rust_edit_traces.csv" rust
|
||||||
|
|
||||||
|
val seph = run_txns_1000_times 0 seph_arr []
|
||||||
|
val _ = write_file "seph_edit_traces.csv" seph
|
||||||
|
|
||||||
|
val automerge = run_txns_1000_times 0 automerge_arr []
|
||||||
|
val _ = write_file "automerge_edit_traces.csv" automerge
|
||||||
in
|
in
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user