A web application for testing the performance of different approaches to accessing object properties in JavaScript. The project compares three approaches to working with objects containing fields in snake_case format.
Compare the performance of three different approaches to accessing object properties:
- Direct snake_case access - accessing properties by their original
snake_casekeys - Pre-converted camelCase - converting all fields to
camelCasebefore testing - Proxy wrapper - using JavaScript Proxy for transparent mapping of
camelCasetosnake_case
- Frontend: TypeScript, Vite, Tailwind CSS
- Testing: Custom performance runner
- Data Generation: Faker.js
- Linting: Biome
- Build: Vite
Each object contains 100 fields in snake_case format, including:
- Personal data (name, email, phone)
- Address information
- Financial data
- Medical information
- Technical data (IP, User Agent, etc.)
- Sequential Read - sequential reading of all object fields
- Random Read - random reading of object fields
- Write - writing values to object fields
- Node.js 18+
- npm or yarn
npm installnpm run generate-datanpm run devnpm run buildnpm run preview- Open the application in your browser
- Select dataset size (1,000, 5,000, or 10,000 records)
- Choose access method (Snake Case, Camel Case, Proxy)
- Run tests:
- Read Seq - sequential reading
- Read Random - random reading
- Write - data writing
- View results in the log
- Export results to JSON or CSV
src/
├── bin/ # Command line utilities
│ └── generate-data.ts # Test data generator
├── data/ # Generated datasets
│ ├── 1_000/
│ ├── 5_000/
│ └── 10_000/
├── helpers/ # Helper functions
│ ├── createSmartProxy.ts # Proxy implementation
│ ├── convertToCamelCase.ts
│ └── ...
├── models/ # TypeScript types
├── scenarios/ # Testing scenarios
│ ├── snake/ # Direct snake_case access
│ ├── camel/ # Converted camelCase
│ └── proxy/ # Proxy wrapper
├── buttons.ts # UI handlers
├── constants.ts # Project constants
├── datasets.ts # Dataset loading
├── elements.ts # DOM elements
├── main.ts # Entry point
└── runner.ts # Performance runner
In src/runner.ts you can configure test parameters:
iterations- number of test iterationswarmupRuns- number of warmup runstimeout- test timeout in milliseconds
In src/constants.ts you can change test dataset sizes:
export const DATA_COUNTS = [1_000, 5_000, 10_000] as const;The application outputs detailed statistics for each test:
- Average execution time
- Minimum time
- Maximum time
- Number of iterations
- Timestamp
- Modern interface with Tailwind CSS
- Intuitive test controls
- Real-time result display
- Data export in various formats
- Responsive design
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'fix: feature/amazing-feature - Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is distributed under the MIT License. See the LICENSE file for more information.
Ivan Kalinichenko - [email protected]
⭐ If this project was helpful, please give it a star!