From 0a74c19e817ecf34b36126321660a59569d5f0e3 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 22 Mar 2015 18:49:48 -0400 Subject: [PATCH] Explore possible curve hypotheses --- exploring-curve-shapes.rkt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 exploring-curve-shapes.rkt diff --git a/exploring-curve-shapes.rkt b/exploring-curve-shapes.rkt new file mode 100644 index 0000000..e000099 --- /dev/null +++ b/exploring-curve-shapes.rkt @@ -0,0 +1,23 @@ +#lang racket +;; Experiment with different hypotheses about data curves. +(require plot) + +(define k 0.00035) ;; seconds +(define a 0.00007) ;; seconds +(define gc-time-per-n 0.0000002) + +;; It's quite possible that the curve I'm seeing is logarithmic in the +;; group size for the actual work, plus some GC overhead linear in the +;; group size. +(define (RTT n) + (+ ;; Work: + (+ k (* a (/ (log n) (log 2.718)))) + ;; GC overhead?: + (* n gc-time-per-n))) + +(parameterize ((plot-x-transform log-transform) + (plot-x-ticks (log-ticks))) + (plot-pict (function RTT 1 1076 #:label "RTT") + #:height 450 + #:width 700 + #:y-min 0))