Skip to content

Instantly share code, notes, and snippets.

Sokolov Yura funny-falcon

Block or report user

Report or block funny-falcon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@funny-falcon
funny-falcon / cache_expanded_load_path.patch
Created Dec 15, 2011
Cache expanded_load_patch (patch against ruby-1.9.3-p0)
View cache_expanded_load_path.patch
From 9088356975d13a9a7fbe6832dfd56a8b2ff7b21d Mon Sep 17 00:00:00 2001
From: Sokolov Yura <funny.falcon@gmail.com>
Date: Wed, 18 Jan 2012 14:01:59 +0400
Subject: [PATCH] cached load_path patch
This patch add caching of expanded $LOAD_PATH elements.
It invalidates cache on current directory change and
filesystem encoding change.
---
internal.h | 2 +
@funny-falcon
funny-falcon / cached_lp_sorted_lf.patch
Created Dec 16, 2011
Cumulative: Sorted loaded features + Cached load path (against 1.9.3-p0)
View cached_lp_sorted_lf.patch
diff --git a/file.c b/file.c
index 81f28ff..6aad4b0 100644
--- a/file.c
+++ b/file.c
@@ -2819,6 +2819,20 @@ ntfs_tail(const char *path)
buflen = RSTRING_LEN(result),\
pend = p + buflen)
+#define EXPAND_PATH()\
+ if ( !(abs_mode & FEP_DIR_EXPANDED) ) { \
@funny-falcon
funny-falcon / hash_optimize.patch
Created Dec 22, 2011
Hash optimize patch (1.9.3-p0)
View hash_optimize.patch
diff --git a/common.mk b/common.mk
index ea244cc..4f22609 100644
--- a/common.mk
+++ b/common.mk
@@ -629,7 +629,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \
@funny-falcon
funny-falcon / bench.txt
Created Dec 27, 2011
Testing Redmine with hash patch
View bench.txt
Test of Redmine issues/issue pages with ruby patched by `compact hash` patch.
I choose this pages cause Issue model have 23 fields and User model hash 17 fields.
Benchmark env:
Ubuntu 11.04 32bit, rvm, AthlonX2 @2000GHz
export RUBY_GC_MALLOC_LIMIT=60000000
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_FREE_MIN=500000
export RAILS_ENV=production
@funny-falcon
funny-falcon / test_malloc.c
Created Jan 11, 2012
Test malloc allocation steps
View test_malloc.c

Test of malloc allocation strategy.

Environment: Ubuntu 11.04 32bit. libc - libc6 (2.13ubuntu) tcmalloc - libtcmalloc_minimal0 1.5-1 jemalloc - jemalloc 2.2.5 standalone

tested allocation of 1000000 chunks with time -f %M chunk sizes are from 1 to 600. Only allocation strategy boundaries are shown.

@funny-falcon
funny-falcon / a_test.sh
Created Jan 17, 2012
Performance tesing of patches for st_table (Ruby-trunk)
View a_test.sh
RTRUNK=/home/yura/tmp/ruby/bin
alias mtime='/usr/bin/time -f "real %e\tuser %U\tsys %S\nmax %M\tcw %c" $@'
# WHEN INSTALLED TRUNK
for i in `seq 1 13` ; do echo $i 1>&2 && mtime $RTRUNK/ruby check.rb $i 100000 ; done > st_trunk.log
# 1
# real 0.48 user 0.47 sys 0.00
# max 19760 cw 4
# 2
# real 0.60 user 0.58 sys 0.01
# max 21264 cw 12
@funny-falcon
funny-falcon / cumulative_performance.patch
Created Jan 22, 2012
ruby-1.9.3-p0 cumulative performance patch.
View cumulative_performance.patch
diff --git a/common.mk b/common.mk
index ea244cc..4f22609 100644
--- a/common.mk
+++ b/common.mk
@@ -629,7 +629,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \
@funny-falcon
funny-falcon / backport_gc.patch
Created Jan 26, 2012
Backport new GC for ruby-1.9.3-p0
View backport_gc.patch
diff --git a/ChangeLog b/ChangeLog
index c4ea779..0a6bf73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,188 @@
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
+
@funny-falcon
funny-falcon / performance_and_backport_gc.patch
Created Jan 27, 2012
Union of backport GC and performance patches for ruby-1.9.3-p0
View performance_and_backport_gc.patch
diff --git a/ChangeLog b/ChangeLog
index c4ea779..0a6bf73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,188 @@
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
+
@funny-falcon
funny-falcon / 01_testapp_prepare.sh
Created Jan 30, 2012
Testing application for GC
View 01_testapp_prepare.sh
git clone git://github.com/RailsApps/rails3-devise-rspec-cucumber.git rails3app
cd rails3app
#lets increase working set
sed -i 's/, :group.*//' Gemfile
sed -i '/^\(group\|end\)/ d' Gemfile
rm Gemfile.lock
bundle install
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rails runner '(1..20).each{|i| User.create(email: "as#{i}@df.gh", name: "asdf#{i}", password: "asdfghjk")}'
bundle exec rake assets:precompile
You can’t perform that action at this time.