Skip to content

Replace FuncArgs.insert with prepend_arg, optimize check_signals#2339

Merged
coolreader18 merged 1 commit into
masterfrom
coolreader18/mini-opts
Nov 24, 2020
Merged

Replace FuncArgs.insert with prepend_arg, optimize check_signals#2339
coolreader18 merged 1 commit into
masterfrom
coolreader18/mini-opts

Conversation

@coolreader18
Copy link
Copy Markdown
Member

@coolreader18 coolreader18 commented Nov 23, 2020

Command Mean [s] Min [s] Max [s] Relative
./rustpython-norm benchmarks/pystone.py 50000 6.816 ± 0.653 6.029 7.630 1.06 ± 0.11
./rustpython-opt benchmarks/pystone.py 50000 6.410 ± 0.294 5.937 6.853 1.00

Comment thread vm/src/stdlib/signal.rs

trigger_signals(&signal_handlers.borrow(), vm)
}
#[inline(never)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about cold attribute? this is a question instead of suggestion because i haven't seen any actual usage of cold yet. https://doc.rust-lang.org/reference/attributes/codegen.html

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good, I was thinking that it really isn't that exceptional of a case, but given that it is (possibly) called for every instruction execution it would make sense to signal that it should very rarely ever happen.

@coolreader18 coolreader18 force-pushed the coolreader18/mini-opts branch from 6f23293 to 8ff7a52 Compare November 24, 2020 17:41
@coolreader18 coolreader18 merged commit cf428e1 into master Nov 24, 2020
@coolreader18 coolreader18 deleted the coolreader18/mini-opts branch November 24, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants