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))