<commit_before><!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <h1>TameGame test</h1>
        <script src="../TameGame.js" type="text/javascript"></script>
        <script type="text/javascript">
            console.log("Starting up");

            var someGame = new TameGame.StandardGame();
            console.log(someGame);

            someGame.watch(TameGame.ObjectDetails, 
                            TameGame.UpdatePass.Physics, 
                            (function (obj, newValue) { console.log("ObjectDetails changed to ", newValue.objectName)}));

            var obj = someGame.createObject();
            obj.get(TameGame.ObjectDetails).objectName = "Hello, world";

            someGame.tick(0);
            someGame.tick(1);

            obj.get(TameGame.ObjectDetails).objectName = "Goodbye, world";
            someGame.tick(2);
        </script>
    </body>
</html>
<commit_msg>Add a speed test for the property system<commit_after><!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <h1>TameGame test</h1>
        <script src="../TameGame.js" type="text/javascript"></script>
        <script type="text/javascript">
            console.log("Starting up");

            var someGame = new TameGame.StandardGame();
            console.log(someGame);

            someGame.watch(TameGame.ObjectDetails, 
                            TameGame.UpdatePass.Physics, 
                            (function (obj, newValue) { console.log("ObjectDetails changed to ", newValue.objectName)}));

            var obj = someGame.createObject();
            obj.get(TameGame.ObjectDetails).objectName = "Hello, world";

            someGame.tick(0);
            someGame.tick(1);

            obj.get(TameGame.ObjectDetails).objectName = "Goodbye, world";
            someGame.tick(2);

            var start = Date.now();
            var numItems = 1000000;
            for (var x=0; x<numItems; ++x) {
                obj.get(TameGame.ObjectDetails).objectName = "Speed test";
            }
            var end = Date.now();
            var timeMs = end - start;

            console.log(numItems + " updates in " + timeMs + "ms (" + (numItems/(timeMs/1000.0)) + "/sec)");

            var start = Date.now();
            var numItems = 1000000;
            for (var x=0; x<numItems; ++x) {
                obj.objectName = "Just properties";
            }
            var end = Date.now();
            var fastTimeMs = end - start;

            console.log(numItems + " fast updates in " + fastTimeMs + "ms (" + (numItems/(fastTimeMs/1000.0)) + "/sec)");
            console.log("Slowdown factor " + (timeMs/fastTimeMs));

            someGame.tick(3);
        </script>
    </body>
</html>

{'fraction_non_alphanumeric': 0.1392451447416636, 'fraction_numerical': 0.013558079882740931, 'mean_word_length': 1.7885597548518897, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4904077', 'n_tokens_mistral': 821, 'n_tokens_neox': 774, 'n_words': 156}