HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.1/lodash.min.js"></script>
2
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
Script Preparation code:
x
 
var obj = {
        "crossKey": "EURUSD",
        "dayLowPrice": 1.13045,
        "dayHighPrice": 1.13535,
        "previousClosePrice": 1.13215,
        "priceHist1": 107190404,
        "priceHist2": 250587665,
        "priceHist3": 765906410,
        "priceHist4": 274925633,
        "sparkline": 102925375,
        "spotPrice": 1.1307,
        "midPrice": 1.1307,
        "precision": 4,
        "percentChanged": -0.128,
        "threeMonthForecast": 1.08,
        "sixMonthForecast": 1.04,
        "tradable": true,
        "deliverable": true,
        "key": "EURUSD",
        "displayName": "EUR USD",
        "symbolId": "EURUSD",
        "objectId": 1,
        "assetType": "fx",
        "percentChange": -0.13,
        "selected": true,
        "lineChart": "9991581684158672254519078266440407",
        "barChart": [9, 43, 92, 47, 41, 21, 75, 32, 51, 19, 56, 97, 89, 36, 70, 2, 83, 61, 88, 47, 31, 54],
        "candleChart": "3869460804391469604270058742695196",
        "midPriceModel": "Price: key EURUSD, rate 1.1307, precision 4, appendFrac false, => 1.13 07 ",
        "spotPriceModel": "Price: key EURUSD, rate 1.1307, precision 4, appendFrac false, => 1.13 07 ",
        "crossCurrencies": ["EUR", "USD"],
        "unpackedSparkLine": {
            "price": 2,
            "priceDirection": 1,
            "fiveMinHigh": 4,
            "fiveMinLow": 0,
            "spike": 0,
            "scale": 30
        },
        "priceHistory": [3, 6, 7, 6, 4, 4, 7, 14, 31, 10, 16, 17, 22, 26, 13, 19, 15, 10, 8, 6, 6, 2, 2, 1]
    };
Tests:
  • Angular copy

     
    angular.copy(obj);
  • Lodash Deep Clone

     
    _.cloneDeep(obj);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Angular copy
    Lodash Deep Clone

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125 on Linux
View result in a separate tab
Test name Executions per second
Angular copy 451504.6 Ops/sec
Lodash Deep Clone 181456.1 Ops/sec