Speed up print functions

This commit is contained in:
Jason Turner
2014-11-14 09:45:49 -07:00
parent dc3ef087e2
commit 283152a880
2 changed files with 4 additions and 4 deletions

View File

@@ -202,12 +202,12 @@ namespace chaiscript
static void print(const std::string &s)
{
std::cout << s;
fwrite(s.c_str(), 1, s.size(), stdout);
}
static void println(const std::string &s)
{
std::cout << s << '\n';
puts(s.c_str());
}

View File

@@ -1,4 +1,4 @@
for (var i = 0; i < 100000; ++i) {
print(helloWorld("Bob12345"))
for (var i = 0; i < 1000; ++i) {
puts(helloWorld("Bob12345"))
}