time-to-botec/README.md

52 lines
1.7 KiB
Markdown
Raw Normal View History

2022-11-30 01:57:04 +00:00
# Time to BOTEC
## About
This repository contains example of very simple code to manipulate samples in various programming languages. As of now, it may be useful for checking the validity of simple estimations.
2022-11-30 01:58:55 +00:00
The title of this repository is a pun on two meanings of "time to": "how much time does it take to do x", and "let's do x".
2022-11-30 01:57:04 +00:00
## Current languages
2022-12-01 15:37:10 +00:00
- [x] Python
- [x] R
- [x] Squiggle
- [x] Javascript (NodeJS)
- [x] C
## Performance table
With the [time](https://man7.org/linux/man-pages/man1/time.1.html) tool, using 1M samples:
| Language | Time |
|----------|-----------|
| C | 0m0,442s |
| Node | 0m0,732s |
2022-12-03 13:15:28 +00:00
| Squiggle | 0m1,536s |
2022-12-01 15:37:10 +00:00
| R | 0m7,000s |
| Python (CPython) | 0m16,641s |
2022-12-03 13:15:28 +00:00
2022-12-01 15:37:10 +00:00
I was very surprised that Node/Squiggle code was almost as fast as the raw C code. For the Python code, it's possible that the lack of speed is more a function of me not being as familiar with Python. It's also very possible that the code would run faster with [PyPy](https://doc.pypy.org)
2022-11-30 01:57:04 +00:00
## Languages I may add later
2022-12-01 15:37:10 +00:00
- Julia (TuringML)
2022-11-30 01:57:04 +00:00
- Rust
2022-12-01 15:37:10 +00:00
- Lisp
2022-11-30 01:58:55 +00:00
- ... and suggestions welcome
2022-12-06 22:50:05 +00:00
- Stan
2022-11-30 01:57:04 +00:00
## Roadmap
2022-12-01 15:37:10 +00:00
The future of this project is uncertain. In most words, I simply forget about this repository.
2022-11-30 01:57:04 +00:00
2022-12-01 23:57:45 +00:00
To do:
2022-12-06 22:50:05 +00:00
- [ ] Check whether the Squiggle code is producing 1M samples. Still not too sure.
- Differentiate between initial startup time (e.g., compiling, loading environment) and runtime. This matters because startup time could be ~constant, so for larger projects only the runtime matters.
2022-12-01 23:57:45 +00:00
2022-11-30 01:57:04 +00:00
## Other similar projects
- Squigglepy: <https://github.com/rethinkpriorities/squigglepy>
2022-12-03 13:15:28 +00:00
- Simple Squiggle: <https://github.com/quantified-uncertainty/simple-squiggle>