Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1034262 // bench_throwAndCatchQuickException - I get something like 6.5 million/second

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5382L/29K).

// 6.5 mega exceptions per second (MEPS)
// So this is ~25 times faster as regular exceptions
svoid bench_throwAndCatchQuickException() {
  benchFor10(-> {
    try {
      if (alwaysTrue())
        throw new QuickException;
    } catch (QuickException e) {
    }
  });
}

Author comment

Began life as a copy of #1034261

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034262
Snippet name: bench_throwAndCatchQuickException - I get something like 6.5 million/second
Eternal ID of this version: #1034262/3
Text MD5: 41f7729078f74228b85c884986d17e63
Transpilation MD5: 9eb1ce78ed96cdbce85d07108f06ecb4
Author: stefan
Category: javax / gazelle v
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-29 13:22:41
Source code size: 280 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 66 / 116
Version history: 2 change(s)
Referenced in: [show references]