Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lidash (ES6 wrapper) vs underscore for partition / partitionByKey
(version: 0)
Comparing performance of:
_.partition vs lidash.partitionByKey
Created:
6 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js
Script Preparation code:
var data = [{"code":"LssSeatTeamlinkExtendAddon","isRenewable":true,"eligible":true,"name":"Sales Navigator Teamlink Extend Seat Add-on","description":"WARNING: No Product Description found for product code LssSeatTeamlinkExtendAddon","id":5064639,"family":"LSSSEAT"},{"code":"careerPageSmbPremium","isRenewable":true,"eligible":true,"name":"Career Pages - SMB premium package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $21K traffic driver budget (~700K impressions), 5 audience views, Enhanced analytics","id":130009,"family":"CCP"},{"code":"careerPageEnterpriseAdvanced","isRenewable":true,"eligible":true,"name":"Career Pages - Enterprise advanced package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $21K traffic driver budget (~700K impressions), 5 audience views, Enhanced analytics","id":130012,"family":"CCP"},{"code":"TalentPipeline","isRenewable":true,"eligible":true,"name":"Talent Pipeline seat","description":"Talent Pipeline seat","id":5054805,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"careerPageLargeEnterprisePremium","isRenewable":true,"eligible":true,"name":"Career Pages - Large Enterprise premium package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $48K traffic driver budget (~1.6M impressions), 10 audience views, Enhanced analytics","id":130017,"family":"CCP"},{"duration":"P12M","code":"capJobPack1","isRenewable":false,"eligible":true,"name":"Global Job Credit","description":"Global Job Credit","id":80017,"family":"VC"},{"code":"RecruiterRPS","isRenewable":true,"eligible":true,"name":"Recruiter Professional Services","description":"LinkedIn Recruiter Professional account with team collaboration, auditing, and network search capabilities. Includes 100 InMails per license per month.","id":130201,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"careerPageStaffingStarter","isRenewable":true,"eligible":true,"name":"Career Pages - Staffing starter package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $6K traffic driver budget (~200K impressions), 1 audience view, Standard analytics","id":130023,"family":"CCP"},{"code":"careerPageLargeEnterpriseInternational","isRenewable":true,"eligible":true,"name":"Career Pages - Large Enterprise international package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $12K traffic driver budget (~400K impressions), 2 audience views, Standard analytics","id":130018,"family":"CCP"},{"code":"careerPageMultiNationalPremium","isRenewable":true,"eligible":true,"name":"Career Pages - Multi National premium package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $75K traffic driver budget (~2.5M impressions), unlimited audience views, Enhanced analytics","id":130022,"family":"CCP"},{"code":"capInMail","isRenewable":true,"eligible":true,"name":"Inmail","description":"Relevant for Recruiter and Recruiter Professional Services accounts. The quantity listed represents the number of additional InMail that is provided each month throughout the remaining period of the existing service period, as specified in the contract. Expires at end of term.","id":20005,"provisionGroup":"RECRUITER_CONSUMABLES","family":"CAPINMAIL"},{"code":"TalentHubBundle","isRenewable":true,"ineligibilityReason":{"productNotEligibleForCustomer":{}},"eligible":false,"name":"Talent Hub","description":"LinkedIn Talent Hub, a data powered ATS, uniquely enables companies to source, manage, and hire candidates all on one platform. By combining talent intelligence from LinkedIn’s members with companies’ applicant data, Talent Hub delivers powerful insights in a single place to find and hire exceptional candidates. Talent Hub is sold based on the number of employees, and includes logins for all employees. Talent Hub is designed to work together with other LinkedIn Products like Recruiter or Jobs, but those products are sold separately.","id":5056406,"family":"RECRUITEROFFLINEPKG"},{"code":"careerPageMultiNationalBasic","isRenewable":true,"eligible":true,"name":"Career Pages - Multi National basic package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $27K traffic driver budget (~900K impressions), 5 audience views, Enhanced analytics","id":130020,"family":"CCP"},{"code":"prepaidJymbii","isRenewable":false,"eligible":true,"name":"Prepaid Sponsored Jobs","description":"Prepaid Sponsored Jobs","id":5047007,"provisionGroup":"RECRUITER_CONSUMABLES","family":"PREPAIDJYMBII"},{"code":"jobWrapping","isRenewable":true,"eligible":true,"name":"Job Wrapping","description":"Jobs ported from external sources and posted to LinkedIn via job slots","id":5052007,"family":"JOBWRAPPING"},{"code":"careerPageStaffingBasic","isRenewable":true,"eligible":true,"name":"Career Pages - Staffing basic package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $12K traffic driver budget (~400K impressions), 2 audience views, Standard analytics","id":130024,"family":"CCP"},{"code":"workWithUsAds","isRenewable":true,"eligible":true,"name":"Work With Us Ads","description":"Work With Us banner ads displayed on company employee profile pages.","id":5003406,"family":"ADS"},{"code":"careerPageMultiNationalAdvanced","isRenewable":true,"eligible":true,"name":"Career Pages - Multi National advanced package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $54K traffic driver budget (~1.8M impressions), 10 audience views, Enhanced analytics","id":130021,"family":"CCP"},{"code":"careerPageEmergingMarketSmb","isRenewable":true,"eligible":true,"name":"Career Pages - Emerging Market SMB package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes 1 audience view, Standard analytics","id":130028,"family":"CCP"},{"code":"RecruiterCorporate","isRenewable":true,"eligible":true,"name":"Recruiter Corporate","description":"LinkedIn Recruiter account with team collaboration, auditing, and unparalleled network search capabilities. Includes at least 150 InMails/month per license as well as basic training and support.","id":130200,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"careerPageMultiNationalStarter","isRenewable":true,"eligible":true,"name":"Career Pages - Multi National starter package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes 2 audience views, Standard analytics","id":130019,"family":"CCP"},{"code":"careerPageSmbInternational","isRenewable":true,"eligible":true,"name":"Career Pages - SMB international package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $6K traffic driver budget (~200K impressions), 2 audience views, Standard analytics","id":130010,"family":"CCP"},{"code":"AdminDashboardManager","isRenewable":true,"eligible":true,"name":"Administrator Dashboard Manager","description":"Paid seat for admin access to provision and manage user accounts in LinkedIn Recruiter.","id":5051252,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"LssBundleTier2","isRenewable":true,"eligible":true,"name":"Sales Navigator Team","description":"WARNING: No Product Description found for product code LssBundleTier2","id":113000,"family":"LSSPKG"},{"code":"LssBundleTier3","isRenewable":true,"eligible":true,"name":"Sales Navigator Enterprise","description":"WARNING: No Product Description found for product code LssBundleTier3","id":124000,"family":"LSSPKG"},{"code":"careerPageLargeEnterpriseBasic","isRenewable":true,"eligible":true,"name":"Career Pages - Large Enterprise basic package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $12K traffic driver budget (~400K impressions), 1 audience view, Standard analytics","id":130015,"family":"CCP"},{"code":"careerPageEmergingMarketEnterprise","isRenewable":true,"eligible":true,"name":"Career Pages - Emerging Market Enterprise package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $6K traffic driver budget (~200K impressions), 1 audience view, Standard analytics","id":130029,"family":"CCP"},{"code":"careerPageEnterpriseBasic","isRenewable":true,"eligible":true,"name":"Career Pages - Enterprise basic package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $9K traffic driver budget (~300K impressions), 1 audience view, Standard analytics","id":130011,"family":"CCP"},{"code":"careerPageSmbStarter","isRenewable":true,"eligible":true,"name":"Career Pages - SMB starter package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes 1 audience view, Standard analytics","id":130006,"family":"CCP"},{"code":"careerPageSmbBasic","isRenewable":true,"eligible":true,"name":"Career Pages - SMB basic package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $6K traffic driver budget (~200K impressions), 1 audience view, Standard analytics","id":130007,"family":"CCP"},{"code":"TalentInsightsStaffing","isRenewable":true,"eligible":true,"name":"Talent Insights: Staffing","description":"LinkedIn Talent Insights provides you on-demand access to real-time LinkedIn data and insights on talent pools and companies of interest. The Staffing package gives all members in your company access to LTI.","id":5052817,"provisionGroup":"TALENT_INSIGHTS","family":"TALENTINSIGHTSPACKAGE"},{"code":"careerPageStaffingAdvanced","isRenewable":true,"eligible":true,"name":"Career Pages - Staffing advanced package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $21K traffic driver budget (~700K impressions), 5 audience views, Enhanced analytics","id":130025,"family":"CCP"},{"code":"careerPageStaffingUnlimited","isRenewable":true,"eligible":true,"name":"Career Pages - Staffing unlimited package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $75K traffic driver budget (~2.5M impressions), unlimited audience views, Enhanced analytics","id":130027,"family":"CCP"},{"code":"careerPageEnterprisePremium","isRenewable":true,"eligible":true,"name":"Career Pages - Enterprise premium package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $36K traffic driver budget (~1.2M impressions), 10 audience views, Enhanced analytics","id":130013,"family":"CCP"},{"code":"JobsDashboardManager","isRenewable":true,"eligible":true,"name":"Jobs Dashboard Manager","description":"Free seat to manage jobs in LinkedIn Recruiter without the people search functionality of the standard Recruiter seat.","id":5051242,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"RecruiterSMB","isRenewable":true,"eligible":true,"name":"Recruiter Small Business","description":"LinkedIn Recruiter account for small businesses. Includes team collaboration, auditing, and unparalleled network search capabilities within Brazil. Includes 100 InMails/month per license as well as basic training and support.","id":130203,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"capJobSlot","isRenewable":true,"eligible":true,"name":"Job Slot","description":"Reserved annual job posting with ability to change, update, remove on demand.","id":20004,"provisionGroup":"RECRUITER_CONSUMABLES","family":"CAPJOBSLOT"},{"code":"careerPageLargeEnterpriseAdvanced","isRenewable":true,"eligible":true,"name":"Career Pages - Large Enterprise advanced package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $27K traffic driver budget (~900K impressions), 5 audience views, Enhanced analytics","id":130016,"family":"CCP"},{"code":"RecruiterLite","isRenewable":true,"eligible":true,"name":"Recruiter Lite","description":"Recruiter Lite (Only sold through Small Business Solution Packages)","id":5037084,"provisionGroup":"RECRUITER_CONSUMABLES","family":"RECRUITERPKG"},{"code":"careerPageSmbAdvanced","isRenewable":true,"eligible":true,"name":"Career Pages - SMB advanced package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $12K traffic driver budget (~400K impressions), 2 audience views, Standard analytics","id":130008,"family":"CCP"},{"code":"careerPageStaffingPremium","isRenewable":true,"eligible":true,"name":"Career Pages - Staffing premium package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $48K traffic driver budget (~1.6M impressions), 10 audience views, Enhanced analytics","id":130026,"family":"CCP"},{"code":"careerPageEnterpriseInternational","isRenewable":true,"eligible":true,"name":"Career Pages - Enterprise international package","description":"Custom content on LinkedIn company profile page. Includes: preferred placement on company page for custom content, Life and Jobs tabs, customizable modules. 12-month package includes $9K traffic driver budget (~300K impressions), 2 audience views, Standard analytics","id":130014,"family":"CCP"}];
Tests:
_.partition
var result = _.partition(data, (item) => item.family === 'CCP');
lidash.partitionByKey
function partitionKeyValue(arr, key, val) { return arr.reduce( // eslint-disable-next-line no-sequences (objKey, item) => ((item[key] === val ? objKey[0] : objKey[1]).push(item), objKey), [[], []] ); } var result = partitionKeyValue(data, 'family', 'CCP');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
_.partition
lidash.partitionByKey
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):
I'll provide an answer based on the provided data. **Data** * **Benchmark Data**: An array of objects containing benchmark definitions, test names, and raw UA strings for different JavaScript benchmarks. + `_.partition` + `lidash.partitionByKey` + `_.partition` (Chrome 80, Desktop) + `lidash.partitionByKey` (Chrome 80, Desktop) * **RawUAString**: An array of Raw UA strings representing various browsers and devices. * **Html Preparation Code**: A URL for a JavaScript library (`underscore.js`) * **Individual Test Cases**: An array of objects defining individual test cases with benchmark definitions and test names. **Question** Given the provided data, what is the purpose of the `lidash.partitionByKey` benchmark? **Answer** The `lidash.partitionByKey` benchmark appears to be similar to a JavaScript implementation of the `_.partition` function. It takes an array, a key, and a value as inputs and returns two arrays: one containing elements that match the key-value pair and another containing elements that do not. In this case, the `lidash.partitionByKey` benchmark is likely being used to compare its performance with the native JavaScript `_.partition` function. The raw UA strings provided suggest that both benchmarks are run on Chrome 80 and Desktop platforms. To write this answer in the format of a single executable code block: ```javascript function partitionKeyValue(arr, key, val) { return arr.reduce( (objKey, item) => ((item[key] === val ? objKey[0] : objKey[1]).push(item), objKey), [[], []] ); } // Run the lidash.partitionByKey benchmark var result = partitionKeyValue(data, 'family', 'CCP'); // Run the native JavaScript _.partition function for comparison function _partition(arr, callback) { return arr.reduce( (objKey, item) => ((callback(item) ? objKey[0] : objKey[1]).push(item), objKey), [[], []] ); } var resultNative = _partition(data, (item) => item.family === 'CCP'); ``` Please let me know if this answer meets your requirements.
Related benchmarks:
lidash (ES6 wrapper) vs underscore for union / concat
lidash (ES6 wrapper) vs underscore for union
lidash (ES6 wrapper) union vs concat
lidash (ES6 wrapper) vs underscore for partition
Comments
Confirm delete:
Do you really want to delete benchmark?