Skip to content

Instantly share code, notes, and snippets.

@folkertdev
Created March 4, 2025 13:35
Show Gist options
  • Select an option

  • Save folkertdev/01aff3dc6b2cebb09d2ef00e0bf532ec to your computer and use it in GitHub Desktop.

Select an option

Save folkertdev/01aff3dc6b2cebb09d2ef00e0bf532ec to your computer and use it in GitHub Desktop.
comrak_benchmark.rs
```rust
pub fn main() {
for _ in 0..100000 {
for email in INPUT {
let result = autolink_email(core::hint::black_box(email.as_bytes()));
}
}
}
const INPUT: &[&str] = &[
"alice@example.com>",
"bob.smith@company.org>",
"charlie123@sub.example.net>",
"delta-test@web-service.com>",
"echo+filter@domain.io>",
"foobar@long-domain-name.co.uk>",
"hacker@1337.net>",
"john_doe@university.edu>",
"contact@business-site.biz>",
"user.name@company-info.org>",
"random_email@my-website.de>",
"info@startup.xyz>",
"support@helpdesk.online>",
"admin@server-hosting.co>",
"customer-service@shop-now.com>",
"sales-team@marketing-agency.io>",
"noreply@auto-mailer.org>",
"press@news-site.tv>",
"billing@ecommerce-store.net>",
"donotreply@no-reply-email.com>",
"hr_department@bigcorp.com>",
"ceo@top-management.org>",
"root@localhost.localdomain>",
"it_support@tech-firm.dev>",
"security@secure-mail.net>",
"data.privacy@legalteam.law>",
"engineer@innovations.co>",
"feedback@user-research.info>",
"user_underscore@weird_format.com>",
"researcher@ai-labs.net>",
"qa-team@software-dev.io>",
"beta-tester@early-access.org>",
"hello-world@demo-app.com>",
"notify-me@updates-feed.biz>",
"recruiter@hiring-now.jobs>",
"travel.agent@vacations.global>",
"investor.relations@finance.group>",
"backups@server-system.net>",
"webmaster@personal-blog.me>",
"project.manager@teamworks.app>",
"freelancer@remote-work.site>",
"student@college.edu>",
"teacher@high-school.k12>",
"board.member@ngo.organization>",
"nonprofit@charity.fund>",
"scientist@space-agency.space>",
"developer@open-source.dev>",
"artist@creative-community.art>",
"musician@music-label.band>",
"photographer@photo-studio.pics>",
"gamer@esports-team.gg>",
"streamer@live-streamer.tv>",
"chef@fine-dining.restaurant>",
"chef+reservations@catering.services>",
"bookstore@reading-club.books>",
"fashion@trendsetters.style>",
"food-blogger@delicious-recipes.cafe>",
"gardener@plants-and-flowers.garden>",
"hiker@outdoor-adventures.tours>",
"mechanic@auto-repairs.garage>",
"librarian@public-library.info>",
"scientist@research-lab.science>",
"writer@storytelling.blog>",
"editor@magazine.publication>",
"founder@startup-incubator.ventures>",
"lawyer@legal-advice.attorney>",
"therapist@mental-health.clinic>",
"doctor@hospital-center.health>",
"athlete@sports-league.club>",
"coach@team-coaching.training>",
"engineer@tech-startup.solutions>",
"archaeologist@historical.site>",
"historian@museum-exhibits.history>",
"biologist@marine-research.ocean>",
"pilot@airline-company.aero>",
"fisherman@deep-sea-fishing.boats>",
"sailor@yacht-club.sail>",
"explorer@global-expedition.travel>",
"climatologist@climate-change.earth>",
"astronomer@observatory.space>",
"astrophysicist@cosmos-research.universe>",
"chemist@pharmaceuticals.medicine>",
"physicist@quantum-lab.science>",
"mathematician@data-analysis.math>",
"statistician@big-data.analytics>",
"analyst@market-research.economics>",
"entrepreneur@business-strategy.consulting>",
"consultant@corporate-advisors.management>",
"realtor@real-estate.agency>",
"investor@stock-market.trading>",
"financier@wealth-management.capital>",
"banker@financial-services.bank>",
"politician@government-office.gov>",
"officer@law-enforcement.police>",
"firefighter@emergency-response.fire>",
"paramedic@ambulance-services.med>",
"scientific.author@peer-review.journal>",
"scientist@genetics-research.bio>",
"ai.engineer@machine-learning.ai>",
"roboticist@robotics-lab.tech>",
"researcher@neuroscience.brain>",
"programmer@backend-development.dev>",
"sysadmin@network-security.sys>",
"it.manager@enterprise-it.cloud>",
"technician@hardware-support.repair>",
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment