目录

SwiftTimeIt

A TimeIt function written in swift based loosely after IPython timeit magic.

Installation

In Swift Jupyter Notebook:

%install '.package(url: "https://github.com/bhansconnect/SwiftTimeit", from: "1.0.0")' SwiftTimeit
import SwiftTimeit

Usage

Use time to measure the execution time of a function once. It is not accurate for short functions. Time Usage

Use timeit to accurately measure the execution time of a function. Timeit will atomacitically calculate the number of loops to run to get sufficient accuracy, if loops is not specified. Timeit will let you know if there is a large difference between best and worst case execution. Timeit Usage

See TimeitExample.ipynb

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号