Adam Chlipala d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
..
.gitignore 3b5d88fd6c Add cached_query test for Ur/Web (#3839) 7 年之前
README.md b472c2f4dd Remove source_code files, count all files instead (#3715) 7 年之前
bench.ur d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
bench.urp b4f32f61bd Switch to pulling all Ur/Web infrastructure from Ubuntu (#3823) 7 年之前
bench.urs d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
benchmark_config.json d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
config.toml d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
urweb-cache.dockerfile d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
urweb-mysql-cache.dockerfile d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
urweb-mysql.dockerfile d0c3ce6011 Update Ur/Web version (#8794) 1 年之前
urweb.dockerfile d0c3ce6011 Update Ur/Web version (#8794) 1 年之前

README.md

TechEmpower Framework Benchmark: Ur/Web

This is a benchmark solution in the Ur/Web language: http://www.impredicative.com/ur/

Caveats, in Comparing with Other Frameworks

Ur/Web is unusual in a few ways of favoring simplicity over performance, which has consequences for the results in this benchmark comparison. For instance:

  • Security: The design of Ur/Web favors making common security mistakes impossible. Most such mechanisms have no run-time costs, but some do. For instance, the standard-library random number generator is cryptographically secure, which adds overhead to the benchmarks that generate many random numbers.
  • Concurrency: The concurrency model of Ur/Web is transactions. An Ur/Web programmer never needs to think about an interleaving semantics for threads. The implementation relies on the transaction features of SQL engines, which add an overhead (e.g., extra database round-trips to begin/end transactions) to those tests that most other solutions avoid by accepting more complex concurrency semantics. (We hope there will be an explicit transactions test soon!)

Code Structure & Build Instructions

To compile a standalone executable running on port 8080, run urweb bench. See setup.py for fancier options.

bench.ur is the main source file. bench.urs is the signature file describing the module's exported functions. bench.urp is the project file giving compilation directives.

benchmark_config.json includes metadata for the framework comparison.

__init__.py and setup.py are for starting and stopping the Ur/Web server. setup_mysql.py is a variant using MySQL instead of PostgreSQL.