energy-languages
Science Score: 46.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
1 of 13 committers (7.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.4%) to scientific vocabulary
Keywords from Contributors
Repository
Basic Info
Statistics
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Energy Efficiency in Programming Languages
Nicolas van Kempen, Hyuk-Je Kwon, Dung Tuan Nguyen, Emery Berger.
Documentation
Requirements
Running the measurement tool requires: - an Intel processor with RAPL support. - Linux (tested on Ubuntu 22.04).
Docker
The easiest way to run these benchmarks is using Docker:
bash
% sudo modprobe msr # Enable msr kernel module.
% sudo python3 -m scripts.build_docker_image
% sudo docker run --privileged -v [OUTPUT_DIRECTORY]:/root/data energy-languages [OPTIONS]
Here is an example running all languages/benchmarks pairs:
bash
% sudo docker run -it --rm --privileged -v `pwd`/data/`hostname -s`/docker-default:/root/data energy-languages \
--languages C C++ Rust Go Java C\# JavaScript TypeScript PHP Python PyPy Lua LuaJIT \
--warmup 1 \
--iterations 21 \
--timeout 10000
Running additional experiments:
bash
% sudo docker run -it --rm --privileged -v `pwd`/data/`hostname -s`/docker-default:/root/data energy-languages \
--benchmark-root experiments \
--languages "C as C++" "Go-no-GC" "JavaScript as TypeScript" \
--warmup 1 \
--iterations 21 \
--timeout 10000
Running Java-N experiments:
bash
% sudo ./scripts/docker-java-n.sh Java docker-default
Processors can be set to their minimum frequency with the following commands: ```bash
Use frequency-info to check the defaults for your machine.
% cpupower frequency-info
Pin to lowest possible frequency.
% echo 1 | sudo tee /sys/devices/system/cpu/intelpstate/noturbo % sudo cpupower frequency-set --governor powersave % sudo cpupower frequency-set --max 800Mhz
Restore defaults after running experiments.
% echo 0 | sudo tee /sys/devices/system/cpu/intelpstate/noturbo % sudo cpupower frequency-set --governor powersave % sudo cpupower frequency-set --max 3.4GHz ```
Finally, experiments can be pinned to a single code by using Docker's
--cpuset-cpus option, specifying a core number. For example:
bash
% sudo docker run -it --rm --privileged --cpuset-cpus=13 [...]
Figures
Average power draw as a function of the average number of cores used

bash
% python3 -m scripts.normalize_cores \
--data-root data/`hostname -s`/docker-default \
--languages C C++ Rust Go Java C\# JavaScript TypeScript PHP Python PyPy Lua LuaJIT
Average power draw as a function of memory activity

bash
% python3 -m scripts.dram \
--data-root data/`hostname -s`/docker-default \
--languages C C++ Rust Go Java C\# JavaScript TypeScript PHP Python PyPy Lua LuaJIT
Average power draw controlling for external factors

bash
% python3 -m scripts.fixed_time \
--data-root data/`hostname -s`/docker-min-freq-cpuset-13 \
--languages C C++ Rust Go Java C\# JavaScript TypeScript PHP Python PyPy Lua LuaJIT
Other
A few other scripts can be useful to generate figures and results.
Their options are self-explanatory and/or documented in the --help message.
Notably:
- scripts.table: Build two tables comparing runtime and energy
consumption for a list of languages.
- scripts.barchart: Compare two implementations of the same programming
language.
- scripts.java_n: Generate a figure for a given benchmark of time per
iteration as a function of number of iterations.
License
The original benchmark suite, the Computer Language Benchmark Game, is under BSD-3-Clause.
Code from the repository this one originally forked from is under MIT.
Any other code in this repository is under Apache-2.0.
Owner
- Name: Nicolas van Kempen
- Login: nicovank
- Kind: user
- Website: https://nvankempen.com
- Repositories: 32
- Profile: https://github.com/nicovank
GitHub Events
Total
- Watch event: 7
- Push event: 20
- Create event: 1
Last Year
- Watch event: 7
- Push event: 20
- Create event: 1
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Nicolas van Kempen | n****p@g****m | 572 |
| Dung Tuan Nguyen | n****r@g****m | 28 |
| MarcoCouto | m****0@g****m | 11 |
| Hyuk-Je Kwon | h****n@g****m | 7 |
| root | r****t@o****u | 7 |
| dependabot[bot] | 4****] | 6 |
| States | r****3@g****m | 4 |
| Green Software Lab | g****b@d****t | 2 |
| Ben Albrecht | b****t | 1 |
| Felipe Móz | 6****z | 1 |
| José Nuno Macedo | j****o@i****t | 1 |
| Logan Kilpatrick | 2****3@g****m | 1 |
| michaljroszak | 4****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 5
- Total pull requests: 40
- Average time to close issues: 2 months
- Average time to close pull requests: 3 days
- Total issue authors: 1
- Total pull request authors: 4
- Average comments per issue: 0.8
- Average comments per pull request: 0.5
- Merged pull requests: 35
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 8 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 7.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- nicovank (4)
Pull Request Authors
- nicovank (25)
- dependabot[bot] (9)
- hyukjekwon (6)
- dungwinux (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
- Total downloads: unknown
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 0
proxy.golang.org: github.com/nicovank/Energy-Languages
- Homepage: https://github.com/nicovank/Energy-Languages
- Documentation: https://pkg.go.dev/github.com/nicovank/Energy-Languages#section-documentation
- License: Apache-2.0
Rankings
proxy.golang.org: github.com/nicovank/energy-languages
- Homepage: https://github.com/nicovank/energy-languages
- Documentation: https://pkg.go.dev/github.com/nicovank/energy-languages#section-documentation
- License: Apache-2.0
Rankings
Dependencies
- @types/node 18.11.9
- @types/node ^18.11.9
- actions/checkout v3 composite
- actions/checkout v3 composite
- autocfg 1.1.0
- cfg-if 1.0.0
- crossbeam-channel 0.5.8
- crossbeam-deque 0.8.3
- crossbeam-epoch 0.9.14
- crossbeam-utils 0.8.15
- either 1.8.1
- hermit-abi 0.2.6
- libc 0.2.141
- memoffset 0.8.0
- num_cpus 1.15.0
- rayon 1.7.0
- rayon-core 1.11.0
- scopeguard 1.1.0
- typed-arena 2.0.2
- autocfg 1.1.0
- cfg-if 1.0.0
- crossbeam-channel 0.5.8
- crossbeam-deque 0.8.3
- crossbeam-epoch 0.9.14
- crossbeam-utils 0.8.15
- either 1.8.1
- hermit-abi 0.2.6
- libc 0.2.141
- memoffset 0.8.0
- num_cpus 1.15.0
- rayon 1.7.0
- rayon-core 1.11.0
- scopeguard 1.1.0
- hermit-abi 0.2.6
- libc 0.2.141
- num_cpus 1.15.0
- aho-corasick 0.7.20
- memchr 2.5.0
- regex 1.7.3
- regex-syntax 0.6.29
- autocfg 1.1.0
- cfg-if 1.0.0
- crossbeam-channel 0.5.8
- crossbeam-deque 0.8.3
- crossbeam-epoch 0.9.14
- crossbeam-utils 0.8.15
- either 1.8.1
- hermit-abi 0.2.6
- libc 0.2.141
- memoffset 0.8.0
- num_cpus 1.15.0
- rayon 1.7.0
- rayon-core 1.11.0
- scopeguard 1.1.0
- autocfg 1.1.0
- cfg-if 1.0.0
- crossbeam-channel 0.5.8
- crossbeam-deque 0.8.3
- crossbeam-epoch 0.9.14
- crossbeam-utils 0.8.15
- either 1.8.1
- hermit-abi 0.2.6
- libc 0.2.141
- memoffset 0.8.0
- num_cpus 1.15.0
- rayon 1.7.0
- rayon-core 1.11.0
- scopeguard 1.1.0
- @types/node 18.16.1
- @types/node 18.16.1
- actions/checkout v4 composite
- gmpy2 ==2.1.5
- black ==24.4.2
- matplotlib ==3.9.0
- mypy ==1.10.0
- numpy ==1.26.4
- pandas ==2.2.2
- pandas-stubs ==2.2.2.240514
- rich ==13.7.1
- scipy ==1.13.1