aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/bc
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/bc')
-rw-r--r--benchmarks/bc/add.bc21
-rw-r--r--benchmarks/bc/arrays.bc38
-rw-r--r--benchmarks/bc/arrays_and_constants.bc38
-rw-r--r--benchmarks/bc/bitfuncs.bc18
-rw-r--r--benchmarks/bc/constants.bc41
-rw-r--r--benchmarks/bc/divide.bc26
-rw-r--r--benchmarks/bc/functions.bc38
-rw-r--r--benchmarks/bc/irand_long.bc12
-rw-r--r--benchmarks/bc/irand_short.bc9
-rw-r--r--benchmarks/bc/lib.bc11
-rw-r--r--benchmarks/bc/multiply.bc23
-rw-r--r--benchmarks/bc/postfix_incdec.bc11
-rw-r--r--benchmarks/bc/power.bc2
-rw-r--r--benchmarks/bc/strings.bc40
-rw-r--r--benchmarks/bc/subtract.bc22
15 files changed, 0 insertions, 350 deletions
diff --git a/benchmarks/bc/add.bc b/benchmarks/bc/add.bc
deleted file mode 100644
index 90a83e4758d9..000000000000
--- a/benchmarks/bc/add.bc
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /usr/bin/bc -lq
-
-print "scale = 20\n"
-print "x = 1234567890 / scale\n"
-print "len = length(x) + 1 + scale\n"
-print "len *= 2\n"
-
-scale = 20
-x = 1234567890 / scale
-len = length(x) + 1 + scale
-len *= 2
-
-for (i = 0; i <= len; ++i) {
- print "a[", i, "] = x * (10^", i, ")\n"
-}
-
-for (i = 1; i <= 10000; ++i) {
- for (j = 0; j < len; ++j) {
- print "v = a[", i, "] + a[", j, "]\n"
- }
-}
diff --git a/benchmarks/bc/arrays.bc b/benchmarks/bc/arrays.bc
deleted file mode 100644
index cc0276d6ad20..000000000000
--- a/benchmarks/bc/arrays.bc
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/bc
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2018-2021 Gavin D. Howard and contributors.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-max = 1000000
-
-for (i = 0; i < max; ++i) {
- print "a", i, "[0] = ", i, "\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/arrays_and_constants.bc b/benchmarks/bc/arrays_and_constants.bc
deleted file mode 100644
index 9a2172ece5be..000000000000
--- a/benchmarks/bc/arrays_and_constants.bc
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/bc
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2018-2021 Gavin D. Howard and contributors.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-max = 1000000
-
-for (i = 0; i < max; ++i) {
- print "b", i, "[100] = ", i, "\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/bitfuncs.bc b/benchmarks/bc/bitfuncs.bc
deleted file mode 100644
index 69d357c2ce8a..000000000000
--- a/benchmarks/bc/bitfuncs.bc
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /usr/bin/bc -lq
-
-scale = 0
-max = 10000
-
-print "scale = 0\n"
-
-for (i = 0; i < max; ++i) {
-
- a = rand()
- b = rand()
-
- print "band(", a, ", ", b, ")\n"
- print "bor(", a, ", ", b, ")\n"
- print "bxor(", a, ", ", b, ")\n"
- print "bshl(", a, ", ", b % 32, ")\n"
- print "bshr(", a, ", ", b % 32, ")\n"
-}
diff --git a/benchmarks/bc/constants.bc b/benchmarks/bc/constants.bc
deleted file mode 100644
index 1f7b92d47566..000000000000
--- a/benchmarks/bc/constants.bc
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/bc
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2018-2021 Gavin D. Howard and contributors.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-max = 1000
-max2 = 1000
-
-for (i = 0; i < max; ++i) {
-
- print "c = ", i, "\n"
- print "e = 0.", i, "\n"
-
- for (j = 0; j < max2; ++j) {
- print "d = ", i, ".", j, "\n"
- }
-}
diff --git a/benchmarks/bc/divide.bc b/benchmarks/bc/divide.bc
deleted file mode 100644
index 227794badbcb..000000000000
--- a/benchmarks/bc/divide.bc
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /usr/bin/bc -lq
-
-print "scale = 20\n"
-print "x = 1234567890 * 10^(-scale)\n"
-print "len = 1 + 2 * scale\n"
-print "scale += 10\n"
-
-scale = 20
-x = 1234567890 * 10^(-scale)
-len = 1 + 2 * scale
-
-scale += 10
-
-for (i = 0; i <= len; ++i) {
- print "a[", i, "] = x * (10^", i, ")\n"
-}
-
-for (i = 1; i <= 10000; ++i) {
- for (j = 0; j < len; ++j) {
- print "v = a[0] / a[", j, "]\n"
- print "v = a[", i, "] / a[", j, "]\n"
- print "v = (a[0] * ", i, ") / a[", j, "]\n"
- print "v = a[0] / (a[", j, "] * ", i, ")\n"
- print "v = (a[0] * ", i, ") / (a[", j, "] * ", i, ")\n"
- }
-}
diff --git a/benchmarks/bc/functions.bc b/benchmarks/bc/functions.bc
deleted file mode 100644
index 7848c8df0c9f..000000000000
--- a/benchmarks/bc/functions.bc
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/bc
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2018-2021 Gavin D. Howard and contributors.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-max = 1000000
-
-for (i = 0; i < max; ++i) {
- print "define etsna", i, "(n) {\n\tn\n}\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/irand_long.bc b/benchmarks/bc/irand_long.bc
deleted file mode 100644
index 2d2404942f83..000000000000
--- a/benchmarks/bc/irand_long.bc
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/bc -lq
-
-start = 2^256
-end = start + 10000000
-
-for (i = start; i < end; ++i) {
- print "irand(", i, ")\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/irand_short.bc b/benchmarks/bc/irand_short.bc
deleted file mode 100644
index a53d407879f3..000000000000
--- a/benchmarks/bc/irand_short.bc
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/bin/bc -lq
-
-for (i = 2; i < 10000000; ++i) {
- print "irand(", i, ")\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/lib.bc b/benchmarks/bc/lib.bc
deleted file mode 100644
index fb7cd1b93354..000000000000
--- a/benchmarks/bc/lib.bc
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/bc -lq
-
-print "for (i = 100; i < 1000; ++i) {\n"
-print " v = pi(i)\n"
-print " v = e(v)\n"
-print " v = l(v)\n"
-print "}\n"
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/multiply.bc b/benchmarks/bc/multiply.bc
deleted file mode 100644
index d4ed08e055c8..000000000000
--- a/benchmarks/bc/multiply.bc
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /usr/bin/bc -lq
-
-print "scale = 20\n"
-print "x = 1234567890 / scale\n"
-print "len = length(x) + 1 + scale\n"
-
-scale = 20
-x = 1234567890 / scale
-len = length(x) + 1 + scale
-
-for (i = 0; i <= len; ++i) {
- print "a[", i, "] = x * (10^", i, ")\n"
-}
-
-for (i = 1; i <= 10000; ++i) {
- for (j = 0; j < len; ++j) {
- print "v = a[0] * a[", j, "]\n"
- print "v = a[", i, "] * a[", j, "]\n"
- print "v = (a[0] * ", i, ") * a[", j, "]\n"
- print "v = a[0] * (a[", j, "] * ", i, ")\n"
- print "v = (a[0] * ", i, ") * (a[", j, "] * ", i, ")\n"
- }
-}
diff --git a/benchmarks/bc/postfix_incdec.bc b/benchmarks/bc/postfix_incdec.bc
deleted file mode 100644
index 2437f4c4c820..000000000000
--- a/benchmarks/bc/postfix_incdec.bc
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/bc -lq
-
-max = 1000000
-
-for (i = 0; i < max; ++i) {
- print "i++\ni--\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/power.bc b/benchmarks/bc/power.bc
deleted file mode 100644
index b067aa732d10..000000000000
--- a/benchmarks/bc/power.bc
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /usr/bin/bc -lq
-
diff --git a/benchmarks/bc/strings.bc b/benchmarks/bc/strings.bc
deleted file mode 100644
index a97017ea78b4..000000000000
--- a/benchmarks/bc/strings.bc
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/bin/bc
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2018-2021 Gavin D. Howard and contributors.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-max = 1000000
-
-print "\qasotehnuasnotehustnaoheusntaoheustnaoheusntaoehunsatoheuastoehuaosnetuhaosetnuhaosentuahoesntuahoeuhstoeunhatoehusanotehusatnoheus\q\n"
-
-for (i = 0; i < max; ++i) {
- print "\qabc", i, " = ", i, "\\n\q\n"
-}
-
-print "halt\n"
-
-halt
diff --git a/benchmarks/bc/subtract.bc b/benchmarks/bc/subtract.bc
deleted file mode 100644
index b88bd60e935c..000000000000
--- a/benchmarks/bc/subtract.bc
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /usr/bin/bc -lq
-
-print "scale = 20\n"
-print "x = 1234567890 / scale\n"
-print "len = length(x) + 1 + scale\n"
-print "len *= 2\n"
-
-scale = 20
-x = 1234567890 / scale
-len = length(x) + 1 + scale
-len *= 2
-
-for (i = 0; i <= len; ++i) {
- print "a[", i, "] = x * (10^", i, ")\n"
-}
-
-for (i = 1; i <= 10000; ++i) {
- for (j = 0; j < len; ++j) {
- print "v = a[", i, "] - a[", j, "]\n"
- }
-}
-