Skip to content

Instantly share code, notes, and snippets.

@benibela
Created August 12, 2018 16:38
Show Gist options
  • Save benibela/fe74cc0370bf00b1c47c6e23696f69bf to your computer and use it in GitHub Desktop.
Save benibela/fe74cc0370bf00b1c47c6e23696f69bf to your computer and use it in GitHub Desktop.
jni benchmark
5000 books
original:
I/VideLibri(22821): 2018-08-11:14:50:40:259 (1074753876): TESTING TIME: 9174
I/VideLibri(22821): 2018-08-11:14:50:56:704 (1074753876): TESTING TIME: 8211
I/VideLibri(22821): 2018-08-11:14:50:48:491 (1074753876): TESTING TIME: 8231
I/VideLibri(22821): 2018-08-11:14:51:05:039 (1074753876): TESTING TIME: 8335
I/VideLibri(22821): 2018-08-11:14:51:29:757 (1074753876): TESTING TIME: 8252
I/VideLibri(22821): 2018-08-11:14:51:21:505 (1074753876): TESTING TIME: 8223
I/VideLibri(22821): 2018-08-11:14:51:13:281 (1074753876): TESTING TIME: 8242
I/VideLibri(22865): 2018-08-11:14:53:18:471 (1074753876): TESTING TIME: 8469
I/VideLibri(22865): 2018-08-11:14:53:26:648 (1074753876): TESTING TIME: 8176
I/VideLibri(22865): 2018-08-11:14:53:34:807 (1074753876): TESTING TIME: 8159
UNUSED:
public String id, year;
public int issueDate, dueDate, firstExistsDate
I/VideLibri(22995): 2018-08-11:14:59:12:036 (1074753876): TESTING TIME: 8787
I/VideLibri(22995): 2018-08-11:14:59:20:306 (1074753876): TESTING TIME: 8270
I/VideLibri(22995): 2018-08-11:14:59:28:470 (1074753876): TESTING TIME: 8163
UNUSED, unrolled serialize:
I/VideLibri(23211): 2018-08-11:15:05:50:378 (1074753876): TESTING TIME: 8082
I/VideLibri(23211): 2018-08-11:15:05:58:381 (1074753876): TESTING TIME: 8003
I/VideLibri(23211): 2018-08-11:15:06:06:473 (1074753876): TESTING TIME: 8091
USED id year
I/VideLibri(23273): 2018-08-11:15:08:42:969 (1074753876): TESTING TIME: 14874
I/VideLibri(23273): 2018-08-11:15:08:57:843 (1074753876): TESTING TIME: 14874
I/VideLibri(23273): 2018-08-11:15:08:42:969 (1074753876): TESTING TIME: 14874
BASELINE, NO setObjectField
I/VideLibri(23403): 2018-08-11:15:10:48:650 (1074753876): TESTING TIME: 572
I/VideLibri(23403): 2018-08-11:15:10:49:237 (1074753876): TESTING TIME: 587
I/VideLibri(23403): 2018-08-11:15:10:49:802 (1074753876): TESTING TIME: 564
CONSTRUCTOR, title, author, NO isbn/year, preinitialized
I/VideLibri(23474): 2018-08-11:15:22:01:801 (1074753876): TESTING TIME: 641
I/VideLibri(23474): 2018-08-11:15:22:02:459 (1074753876): TESTING TIME: 658
I/VideLibri(23474): 2018-08-11:15:22:03:082 (1074753876): TESTING TIME: 623
CONSTRUCTOR, title, author, NO isbn/year, no init
I/VideLibri(23542): 2018-08-11:15:23:07:408 (1074753876): TESTING TIME: 616
I/VideLibri(23542): 2018-08-11:15:23:08:040 (1074753876): TESTING TIME: 632
I/VideLibri(23542): 2018-08-11:15:23:08:646 (1074753876): TESTING TIME: 606
CONSTRUCTOR, title, author, serialized isbn/year
I/VideLibri(23775): 2018-08-11:15:25:53:027 (1074753876): TESTING TIME: 783
I/VideLibri(23775): 2018-08-11:15:25:53:803 (1074753876): TESTING TIME: 776
I/VideLibri(23775): 2018-08-11:15:25:54:600 (1074753876): TESTING TIME: 796
CONSTRUCTOR, title, author, serialized isbn/year, NO statusId
I/VideLibri(23848): 2018-08-11:15:31:55:255 (1074753876): TESTING TIME: 710
I/VideLibri(23848): 2018-08-11:15:31:55:977 (1074753876): TESTING TIME: 722
I/VideLibri(23848): 2018-08-11:15:31:56:697 (1074753876): TESTING TIME: 720
CONSTRUCTOR, title, author, serialized isbn/year, NO statusId
I/VideLibri(24262): 2018-08-11:16:53:18:964 (1074753876): TESTING TIME: 584
I/VideLibri(24262): 2018-08-11:16:53:19:533 (1074753876): TESTING TIME: 569
I/VideLibri(24262): 2018-08-11:16:53:20:121 (1074753876): TESTING TIME: 588
additional in ARRAY + FindClass
I/VideLibri(24639): 2018-08-11:17:15:05:866 (1074753876): TESTING TIME: 675
I/VideLibri(24639): 2018-08-11:17:15:06:531 (1074753876): TESTING TIME: 664
^[[6~I/VideLibri(24639): 2018-08-11:17:15:07:203 (1074753876): TESTING TIME: 671
additional in ARRAY NO FindClass
I/VideLibri(24701): 2018-08-11:17:17:49:681 (1074753876): TESTING TIME: 567
I/VideLibri(24701): 2018-08-11:17:17:50:257 (1074753876): TESTING TIME: 575
I/VideLibri(24701): 2018-08-11:17:17:50:817 (1074753876): TESTING TIME: 560
additional in ArrayList
I/VideLibri(24902): 2018-08-11:17:31:06:505 (1074753876): TESTING TIME: 557
I/VideLibri(24902): 2018-08-11:17:31:07:078 (1074753876): TESTING TIME: 572
I/VideLibri(24902): 2018-08-11:17:31:07:641 (1074753876): TESTING TIME: 563
BASELINE no setProperty
I/VideLibri(24967): 2018-08-11:17:34:19:312 (1074753876): TESTING TIME: 208
I/VideLibri(24967): 2018-08-11:17:34:19:496 (1074753876): TESTING TIME: 184
I/VideLibri(24967): 2018-08-11:17:34:19:692 (1074753876): TESTING TIME: 196
BASELINE no setStatus
I/VideLibri(25034): 2018-08-11:17:37:00:337 (1074753876): TESTING TIME: 589
I/VideLibri(25034): 2018-08-11:17:37:00:898 (1074753876): TESTING TIME: 560
I/VideLibri(25034): 2018-08-11:17:37:01:446 (1074753876): TESTING TIME: 548
BASELINE with times
I/VideLibri(25099): 2018-08-11:17:39:26:839 (1074753876): TESTING TIME: 605
I/VideLibri(25099): 2018-08-11:17:39:27:419 (1074753876): TESTING TIME: 578
I/VideLibri(25099): 2018-08-11:17:39:28:002 (1074753876): TESTING TIME: 583
FINAL
I/VideLibri(25394): 2018-08-11:18:16:50:582 (1074753876): TESTING TIME: 631
I/VideLibri(25394): 2018-08-11:18:16:51:155 (1074753876): TESTING TIME: 573
I/VideLibri(25394): 2018-08-11:18:16:51:745 (1074753876): TESTING TIME: 589
I/VideLibri(25807): 2018-08-11:19:22:53:191 (1074753876): TESTING TIME: 564
TEST: HASHMAP:
I/VideLibri(25967): 2018-08-11:19:27:27:066 (1074753876): TESTING TIME: 680
I/VideLibri(25967): 2018-08-11:19:27:27:791 (1074753876): TESTING TIME: 725
I/VideLibri(25967): 2018-08-11:19:27:26:386 (1074753876): TESTING TIME: 732
BASELINE history ONLY
I/VideLibri(26058): 2018-08-11:19:36:56:695 (1074753876): TESTING TIME: 9
I/VideLibri(26058): 2018-08-11:19:36:56:711 (1074753876): TESTING TIME: 15
I/VideLibri(26058): 2018-08-11:19:36:56:719 (1074753876): TESTING TIME: 8
(setBooleanField)
BASELINE: account ONLY
I/VideLibri(26129): 2018-08-11:19:39:33:431 (1074753876): TESTING TIME: 1894
I/VideLibri(26129): 2018-08-11:19:39:35:236 (1074753876): TESTING TIME: 1805
I/VideLibri(26129): 2018-08-11:19:39:37:013 (1074753876): TESTING TIME: 1776
(setObjectField strikes again)
FINAL with account in constructor
I/VideLibri(26554): 2018-08-11:20:07:11:092 (1074753876): TESTING TIME: 604
I/VideLibri(26554): 2018-08-11:20:07:11:706 (1074753876): TESTING TIME: 614
I/VideLibri(26554): 2018-08-11:20:07:12:346 (1074753876): TESTING TIME: 640
FINAL + cached strings
I/VideLibri(26948): 2018-08-11:21:43:07:860 (1074753876): TESTING TIME: 496
I/VideLibri(26948): 2018-08-11:21:43:08:296 (1074753876): TESTING TIME: 435
I/VideLibri(26948): 2018-08-11:21:43:08:738 (1074753876): TESTING TIME: 442
----------------------
BASELINE GetObjectField ONLY
I/VideLibri(27028): 2018-08-11:21:52:08:365 (1074753876): TESTING TIME: 14
I/VideLibri(27028): 2018-08-11:21:52:08:379 (1074753876): TESTING TIME: 14
I/VideLibri(27028): 2018-08-11:21:52:08:393 (1074753876): TESTING TIME: 14
----------------------------
jbooktobook
I/VideLibri(27724): 2018-08-11:22:38:35:371 (1074753876): TESTING TIME: 657
I/VideLibri(27724): 2018-08-11:22:38:36:001 (1074753876): TESTING TIME: 630
I/VideLibri(27724): 2018-08-11:22:38:36:649 (1074753876): TESTING TIME: 648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment