ichiban / prolog

The only reasonable scripting engine for Go.
MIT License
564 stars 27 forks source link

Optimize instruction set for slices #287

Closed ichiban closed 1 year ago

ichiban commented 1 year ago

VM instructions were naively implemented with difference lists. This PR optimize the instructions with slices.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.51 :tada:

Comparison is base (a86cad7) 98.59% compared to head (7762597) 99.11%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #287 +/- ## ========================================== + Coverage 98.59% 99.11% +0.51% ========================================== Files 23 23 Lines 7263 7201 -62 ========================================== - Hits 7161 7137 -24 + Misses 85 59 -26 + Partials 17 5 -12 ``` | [Impacted Files](https://codecov.io/gh/ichiban/prolog/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase) | Coverage Δ | | |---|---|---| | [engine/clause.go](https://codecov.io/gh/ichiban/prolog/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase#diff-ZW5naW5lL2NsYXVzZS5nbw==) | `100.00% <100.00%> (+1.59%)` | :arrow_up: | | [engine/vm.go](https://codecov.io/gh/ichiban/prolog/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase#diff-ZW5naW5lL3ZtLmdv) | `94.42% <100.00%> (+9.52%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.