Rochet2 labeled Issue #2213:
- What are the steps to reproduce the issue?
Link a 1000 modules together with the following code inside them by using a Linker.__attribute__((used)) int hello(int i) { return i; }
Then measure the time it takes to call
instance.get_func(&function_name)
for each instance's hello function.
Then create 1000 modules with the same code, except the hello functions in each module has an increasing integer in its name.
The time measurements should differ.In our tests the time with all modules having hello function name takes
0.00096920039999999778
seconds
and when the function names are different (have different number at the end of them) the measured time is
0.000034551999999999665
secondsThe difference is quite significant and the only change we tested was to change the function names in the modules.
What do you expect to happen? What does actually happen? Does it panic, and if so, with which assertion?
We would expect the time to fetch a function to be similar regardless of function naming.Which Wasmtime version / commit hash / branch are you using?
0.19If relevant, can you include some extra information about your environment? (Rust version, operating system, architecture...)
Ubuntu 18.04.5 LTS 64-bit
rustc 1.44.0 (49cae5576 2020-06-01)
16GB RAM, i5-7200 @2.5GHz*4
Rochet2 opened Issue #2213:
- What are the steps to reproduce the issue?
Link a 1000 modules together with the following code inside them by using a Linker.__attribute__((used)) int hello(int i) { return i; }
Then measure the time it takes to call
instance.get_func(&function_name)
for each instance's hello function.
Then create 1000 modules with the same code, except the hello functions in each module has an increasing integer in its name.
The time measurements should differ.In our tests the time with all modules having hello function name takes
0.00096920039999999778
seconds
and when the function names are different (have different number at the end of them) the measured time is
0.000034551999999999665
secondsThe difference is quite significant and the only change we tested was to change the function names in the modules.
What do you expect to happen? What does actually happen? Does it panic, and if so, with which assertion?
We would expect the time to fetch a function to be similar regardless of function naming.Which Wasmtime version / commit hash / branch are you using?
0.19If relevant, can you include some extra information about your environment? (Rust version, operating system, architecture...)
Ubuntu 18.04.5 LTS 64-bit
rustc 1.44.0 (49cae5576 2020-06-01)
16GB RAM, i5-7200 @2.5GHz*4
Rochet2 edited Issue #2213:
- What are the steps to reproduce the issue?
Link a 1000 modules together with the following code inside them by using a Linker.__attribute__((used)) int hello(int i) { return i; }
Then measure the time it takes to call
instance.get_func(&function_name)
for each instance's hello function.
Then create 1000 modules with the same code, except the hello functions in each module has an increasing integer in its name.
The time measurements should differ.In our tests when all modules are having the same hello function name, the average time for a single fetch is
0.00096920039999999778
seconds
and when the function names are different (have different number at the end of them) the measured time is
0.000034551999999999665
secondsThe difference is quite significant and the only change we tested was to change the function names in the modules.
What do you expect to happen? What does actually happen? Does it panic, and if so, with which assertion?
We would expect the time to fetch a function to be similar regardless of function naming.Which Wasmtime version / commit hash / branch are you using?
0.19If relevant, can you include some extra information about your environment? (Rust version, operating system, architecture...)
Ubuntu 18.04.5 LTS 64-bit
rustc 1.44.0 (49cae5576 2020-06-01)
16GB RAM, i5-7200 @2.5GHz*4
Rochet2 edited Issue #2213:
- What are the steps to reproduce the issue?
Link a 1000 modules together with the following code inside them by using a Linker.__attribute__((used)) int hello(int i) { return i; }
Then measure the time it takes to call
instance.get_func(&function_name)
for each instance's hello function.
Then create 1000 modules with the same code, except the hello functions in each module has an increasing integer in its name.
The time measurements should differ.In our tests when all modules are having the same hello function name, the average time for a single fetch is
0.0010949896000000006
seconds
and when the function names are different (have different number at the end of them) the measured time is
0.000036767999999999476
secondsThe difference is quite significant and the only change we tested was to change the function names in the modules.
What do you expect to happen? What does actually happen? Does it panic, and if so, with which assertion?
We would expect the time to fetch a function to be similar regardless of function naming.Which Wasmtime version / commit hash / branch are you using?
0.19If relevant, can you include some extra information about your environment? (Rust version, operating system, architecture...)
Ubuntu 18.04.5 LTS 64-bit
rustc 1.44.0 (49cae5576 2020-06-01)
16GB RAM, i5-7200 @2.5GHz*4
alexcrichton commented on Issue #2213:
Thanks for the report, and this does indeed seem a little bizarre! Would you be able to share some code of how you're using the
wasmtime
crate, and ideally what wasm blobs you're using?
Rochet2 commented on Issue #2213:
Thanks for your response. Closing the issue as new tests show that the measurement was likely simply flawed.
The original measuring code is not available, but attempts to replicate the issue based on code used at the time the issue was created or based on the issue description yields the expected correct result.
Rochet2 closed Issue #2213:
- What are the steps to reproduce the issue?
Link a 1000 modules together with the following code inside them by using a Linker.__attribute__((used)) int hello(int i) { return i; }
Then measure the time it takes to call
instance.get_func(&function_name)
for each instance's hello function.
Then create 1000 modules with the same code, except the hello functions in each module has an increasing integer in its name.
The time measurements should differ.In our tests when all modules are having the same hello function name, the average time for a single fetch is
0.0010949896000000006
seconds
and when the function names are different (have different number at the end of them) the measured time is
0.000036767999999999476
secondsThe difference is quite significant and the only change we tested was to change the function names in the modules.
What do you expect to happen? What does actually happen? Does it panic, and if so, with which assertion?
We would expect the time to fetch a function to be similar regardless of function naming.Which Wasmtime version / commit hash / branch are you using?
0.19If relevant, can you include some extra information about your environment? (Rust version, operating system, architecture...)
Ubuntu 18.04.5 LTS 64-bit
rustc 1.44.0 (49cae5576 2020-06-01)
16GB RAM, i5-7200 @2.5GHz*4
Last updated: Dec 23 2024 at 12:05 UTC