From 467992ee35b59577ddb53f1323b19af3f3e3d134 Mon Sep 17 00:00:00 2001 From: Jimmy Miller Date: Tue, 11 Oct 2022 16:37:05 -0400 Subject: Implement optimize send in yjit (#6488) * Implement optimize send in yjit This successfully makes all our benchmarks exit way less for optimize send reasons. It makes some benchmarks faster, but not by as much as I'd like. I think this implementation works, but there are definitely more optimial arrangements. For example, what if we compiled send to a jump table? That seems like perhaps the most optimal we could do, but not obvious (to me) how to implement give our current setup. Co-authored-by: Alan Wu * Attempt at fixing the issues raised by @XrXr * fix allowlist * returns 0 instead of nil when not found * remove comment about encoding exception * Fix up c changes * Update assert Co-authored-by: Alan Wu * get rid of unneeded code and fix the flags * Apply suggestions from code review Co-authored-by: Alan Wu * rename and fix typo Co-authored-by: Alan Wu --- yjit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'yjit.c') diff --git a/yjit.c b/yjit.c index cc64cccac3..838956f7b4 100644 --- a/yjit.c +++ b/yjit.c @@ -509,6 +509,8 @@ rb_get_cme_def_body_attr_id(const rb_callable_method_entry_t *cme) return cme->def->body.attr.id; } +ID rb_get_symbol_id(VALUE namep); + enum method_optimized_type rb_get_cme_def_body_optimized_type(const rb_callable_method_entry_t *cme) { -- cgit v1.2.1