You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Changes
<!-- Please summarize your changes. -->
<!-- Please link to any applicable information (forum posts, bug
reports, etc.). -->
I've made a bit more documented of a code snippet to help scripters
navigate their way through it, considering not everyone viewing would be
experienced. This take on the deep clone snippet also gives a faster
result, meaning the code is ran faster and you get your value returned
faster.
OLD: **0.0000051** (os.clock)
NEW: **0.0000034** (os.clock)
The difference may be small but definitely in some cases noticeable and
useful. This is due to the usage of the generalized iterator. Also
simplifying the code with ternary operators. But, I believe my take on
this new snippet would definitely be faster, and also educate other
scripters better, even spiking their curiosity in code simplification if
not familiar with ternary operators. All in short, I believe It's a
great take.
https://create.roblox.com/docs/luau/tables#deep-cloneshttps://devforum.roblox.com/t/ternary-like-operation-in-lua/834254
## Checks
By submitting your pull request for review, you agree to the following:
- [x] This contribution was created in whole or in part by me, and I
have the right to submit it under the terms of this repository's open
source licenses.
- [x] I understand and agree that this contribution and a record of it
are public, maintained indefinitely, and may be redistributed under the
terms of this repository's open source licenses.
- [x] To the best of my knowledge, all proposed changes are accurate.
---------
0 commit comments