Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Forum Registration: support@scriptbasic.org
Raspberry BASIC
»
Raspberry BASIC
»
Programming Challenges
»
Just REM
« previous
next »
Print
Pages: [
1
]
Author
Topic: Just REM (Read 24229 times)
admin
Administrator
Posts: 5
Just REM
«
on:
November 22, 2019, 11:17:36 PM »
This thread is focused on the startup and shutdown costs of a programming language. The challenge is to time an empty program with just a REMark as its code.
ScriptBasic
Code: Script BASIC
UNDEF
Remark
pi@RPi4B:~/sbrt/examples $ /usr/bin/time scriba updown.sb
0.00user 0.00system 0:00.01elapsed 60%CPU (0avgtext+0avgdata 1692maxresident)k
0inputs+0outputs (0major+99minor)pagefaults 0swaps
pi@RPi4B:~/sbrt/examples $
«
Last Edit: November 23, 2019, 02:57:52 AM by admin
»
Logged
admin
Administrator
Posts: 5
Re: Just REM
«
Reply #1 on:
November 22, 2019, 11:19:29 PM »
BaCon
Code: Text
REM
pi@RPi4B:~/bacon-dev/examples $ bacon updown.bac
Converting 'updown.bac'... done, 2 lines were processed in 0.026 seconds.
Compiling 'updown.bac'... cc -c updown.bac.c
cc -o updown updown.bac.o -lbacon -L. -lm
Done, program 'updown' ready.
pi@RPi4B:~/bacon-dev/examples $ /usr/bin/time ./updown
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 1100maxresident)k
0inputs+0outputs (0major+75minor)pagefaults 0swaps
pi@RPi4B:~/bacon-dev/examples $
Logged
admin
Administrator
Posts: 5
Re: Just REM
«
Reply #2 on:
November 22, 2019, 11:21:24 PM »
FreeBasic
Code: FreeBasic
REM
pi@RPi4B:~/freebasic/examples $ fbc updown.bas
pi@RPi4B:~/freebasic/examples $ ls -l
total 28
-rwxr-xr-x 1 pi pi 23528 Nov 22 13:19 updown
-rw-r--r-- 1 pi pi 4 Nov 22 10:55 updown.bas
pi@RPi4B:~/freebasic/examples $ /usr/bin/time ./updown
0.00user 0.00system 0:00.01elapsed 58%CPU (0avgtext+0avgdata 2000maxresident)k
0inputs+0outputs (0major+118minor)pagefaults 0swaps
pi@RPi4B:~/freebasic/examples $
Logged
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #3 on:
November 22, 2019, 11:28:41 PM »
Python 3
Code: Python
#
pi@RPi4B:~/python-dev/examples $ /usr/bin/time python3 updown.py
0.07user 0.03system 0:00.10elapsed 98%CPU (0avgtext+0avgdata 7352maxresident)k
0inputs+0outputs (0major+733minor)pagefaults 0swaps
pi@RPi4B:~/python-dev/examples $
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #4 on:
November 23, 2019, 12:21:09 AM »
Perl
Code: Perl
#
pi@RPi4B:~/perl-dev/examples $ /usr/bin/time perl updown.pl
0.00user 0.01system 0:00.01elapsed 91%CPU (0avgtext+0avgdata 3880maxresident)k
0inputs+0outputs (0major+182minor)pagefaults 0swaps
pi@RPi4B:~/perl-dev/examples $
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #5 on:
November 23, 2019, 12:25:35 AM »
JavaScript
Code: Javascript
//
pi@RPi4B:~/javascript-dev/examples $ /usr/bin/time node updown.js
1.61user 0.14system 0:02.26elapsed 77%CPU (0avgtext+0avgdata 29144maxresident)k
38376inputs+0outputs (151major+5813minor)pagefaults 0swaps
pi@RPi4B:~/javascript-dev/examples $
«
Last Edit: November 23, 2019, 12:27:43 AM by John Spikowski
»
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #6 on:
November 23, 2019, 12:34:21 AM »
bash
Code: Bash
#
pi@RPi4B:~/bash-dev/examples $ /usr/bin/time bash updown.sh
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 2524maxresident)k
0inputs+0outputs (0major+121minor)pagefaults 0swaps
pi@RPi4B:~/bash-dev/examples $
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #7 on:
November 23, 2019, 01:08:33 AM »
C
Code: C
int
main
(
int
argc
,
char
**
argv
)
{
}
pi@RPi4B:~/c-dev/examples $ gcc updown.c -o updown
pi@RPi4B:~/c-dev/examples $ ls -l
total 12
-rwxr-xr-x 1 pi pi 7912 Nov 22 17:05 updown
-rw-r--r-- 1 pi pi 37 Nov 22 17:05 updown.c
pi@RPi4B:~/c-dev/examples $ /usr/bin/time ./updown
0.00user 0.00system 0:00.00elapsed 75%CPU (0avgtext+0avgdata 824maxresident)k
0inputs+0outputs (0major+66minor)pagefaults 0swaps
pi@RPi4B:~/c-dev/examples $
«
Last Edit: November 23, 2019, 01:12:04 AM by John Spikowski
»
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #8 on:
November 23, 2019, 02:27:51 AM »
Java
Code: Java
class
updown
{
public
static
void
main
(
String
args
[
]
)
{
}
}
pi@RPi4B:~/java-dev/examples $ javac updown.java
pi@RPi4B:~/java-dev/examples $ /usr/bin/time java updown
0.18user 0.10system 0:00.26elapsed 107%CPU (0avgtext+0avgdata 19080maxresident)k
0inputs+88outputs (0major+1871minor)pagefaults 0swaps
pi@RPi4B:~/java-dev/examples $
«
Last Edit: November 23, 2019, 02:31:16 AM by John Spikowski
»
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #9 on:
November 24, 2019, 06:04:25 AM »
PHP
Code: PHP
<?php
//
?>
pi@RPi4B:~/php-dev/examples $ /usr/bin/time php updown.php
0.07user 0.03system 0:00.11elapsed 94%CPU (0avgtext+0avgdata 12792maxresident)k
0inputs+0outputs (0major+853minor)pagefaults 0swaps
pi@RPi4B:~/php-dev/examples $
Logged
ScriptBasic Project Manager/Facilitator
John Spikowski
BASIC Developer
Posts: 234
Re: Just REM
«
Reply #10 on:
November 24, 2019, 07:49:02 PM »
Here is a results table of the
Do Nothing
challenge.
Logged
ScriptBasic Project Manager/Facilitator
Print
Pages: [
1
]
« previous
next »
Raspberry BASIC
»
Raspberry BASIC
»
Programming Challenges
»
Just REM