nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gitlab-ci: add mongo as service
[nit.git]
/
tests
/
bench_string_tos.nit
diff --git
a/tests/bench_string_tos.nit
b/tests/bench_string_tos.nit
index
1d59691
..
0f34f86
100644
(file)
--- a/
tests/bench_string_tos.nit
+++ b/
tests/bench_string_tos.nit
@@
-14,10
+14,13
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
+var n = 10
+if args.not_empty then n = args.first.to_i
+
var s = "*"
var i = 0
var s = "*"
var i = 0
-while i < 8 do
- s = ["Je dis «", s, "» et redis «", s, "» et trois fois de plus : «", s, s, s, "».\n"].to_s
+while i < n do
+ s = ["Je dis «", s, "» et redis «", s, "» et trois fois de plus : «", s, s, s, "».\n"].plain_to_s
i = i + 1
end
i = i + 1
end
-print(s.length)
+print(s.byte_length)