Score - A calculus for scoreboard optimization

Overview

score

A calculus for scoreboard optimization.

Optimizations

set fusion

scoreboard players set a _ 1
scoreboard players set a _ 2

scoreboard players add b _ 1
scoreboard players set b _ 2

scoreboard players remove c _ 1
scoreboard players set c _ 2

scoreboard players reset d _
scoreboard players set d _ 2
scoreboard players set a _ 2
scoreboard players set b _ 2
scoreboard players set c _ 2
scoreboard players set d _ 2

add/remove fusion

scoreboard players add a _ 2
scoreboard players remove a _ 3
scoreboard players add a _ 2
scoreboard players add a _ 1

Strength reduction

scoreboard players set _ _ 2
scoreboard players operation a _ *= _ _
scoreboard players operation a _ += a _

Batch operation

scoreboard players set a_0 A 0
scoreboard players set a_1 A 0
scoreboard players set b_0 B 0
scoreboard players set b_1 B 0
observe a_0 A
observe a_1 A
observe b_0 B
observe b_1 B
scoreboard players set b_0 B 1
scoreboard players set b_1 B 1
scoreboard players set a_0 A 1
scoreboard players set a_0 A 0
scoreboard players set a_1 A 0
scoreboard players set b_0 B 0
scoreboard players set b_1 B 0
observe a_0 A
observe a_1 A
observe b_0 B
observe b_1 B
scoreboard players set * B 1
scoreboard players reset a_1 B

Algebraic simplification

scoreboard players set a _ 1
scoreboard players operation a _ += b _
scoreboard players operation a _ -= b _
scoreboard players set a _ 1

Dataflow analysis

scoreboard players set a _ 0
execute if score b _ matches 0 run function
    execute unless score b _ matches 0 run scoreboard players operation a _ += b _
    scoreboard players operation a _ += b _
    scoreboard players set b _ 1
    execute unless score b _ matches 0 run scoreboard players operation a _ += b _

    scoreboard players set _ _ 2
    scoreboard players operation a _ /= _ _
    scoreboard players set _ _ 2
    scoreboard players operation b _ %= _ _
scoreboard players set a _ 0
execute if score b _ matches 0 run function
    scoreboard players add a _ 1

    scoreboard players set _ _ 2
    scoreboard players operation a _ /= _ _
    scoreboard players operation b _ %= _ _
You might also like...
Owner
⊢ Minecraft : Type
null
Experimental scoreboard library for spigot

scoreboards completely experimental. not suit for production Testing Progress Basic line updating Basic title updating Performance (should be fine) Ex

Patrick 1 Oct 25, 2022
A simple Football Live Score project using Kotlin.

Football Live Score App (Kotlin) A simple Malaysian Football Live Score project using Kotlin. Started on Aug 2020. Project terminated. Self-developed

Nur Ameerul Ameen 1 Oct 8, 2021
App Launch Optimization

App Launch Optimization

null 0 Oct 30, 2021
An Android app that pulls the credit score information from a given endpoint and displays the records as a donut view

ClearScoreTest This is an Android app that pulls the credit score information fr

Abayomi Akanji 1 Jan 13, 2022
Soot - A Java optimization framework

Using Soot? Let us know about it! We are regularly applying for funding to help us maintain Soot. You can help us immensely by letting us know about p

Soot Program Analysis Framework 2.5k Jan 2, 2023
This is a Game score tracker app built with Jetpack Compose.

This is a Game score tracker app built with Jetpack Compose. The purpose of this repository is to demonstrate below: Implementing entire UI elements w

Atitienei Daniel 4 Dec 2, 2022