Skip to content

Commit b54b05e

Browse files
committed
[misc] don't use py"..." for julia: avoid eval/exec
1 parent e96d3fe commit b54b05e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

perf-compare/README.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,6 @@ Table summarizing number of calls per second that the particular library can rea
194194
|--------------------+---------------+--------------|
195195
| Python | 1000000 | 1600000 |
196196
| burgled-batteries3 | 16500 | - |
197-
| PyCall.jl | 20000 | 240000 |
197+
| PyCall.jl | 320000 | 500000 |
198198
| py4cl2-cffi | 55000 | 210000 |
199199
| py4cl | 4000 | - |

perf-compare/run-pycall.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ function pystr_i(i)
1919
end
2020

2121
function pycall_str(i)
22-
return py"str"(PyObject(i))
22+
return pycall(pybuiltin("str"), String, i)
2323
end
2424

2525
calls_per_second(1, pystr_i)
26-
print("Evaluating performance of pystr_i through 100000 calls...\n")
27-
print("Calls per second: ", calls_per_second(100000, pystr_i), "\n\n")
26+
print("Evaluating performance of pystr_i through 1000000 calls...\n")
27+
print("Calls per second: ", calls_per_second(1000000, pystr_i), "\n\n")
2828

2929
calls_per_second(1, pycall_str)
30-
print("Evaluating performance of pycall_str through 10000 calls...\n")
31-
print("Calls per second: ", calls_per_second(10000, pycall_str), "\n")
30+
print("Evaluating performance of pycall_str through 1000000 calls...\n")
31+
print("Calls per second: ", calls_per_second(1000000, pycall_str), "\n")

0 commit comments

Comments
 (0)